ユーザ用ツール

サイト用ツール


サイドバー

reactnative:react-native-maps

以前のリビジョンの文書です


react-native-maps

インストール

npm install react-native-maps --save
react-native link

エラー

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all files for configuration ':react-native-maps:debugCompileClasspath'.
> Could not resolve com.android.support:support-compat:26.1.0.
  Required by:
      project :react-native-maps
   > Cannot find a version of 'com.android.support:support-compat' that satisfies the version constraints:
        Dependency path 'native_background_timer:react-native-maps:unspecified' --> 'com.facebook.react:react-native:0.59.1' --> 'com.android.support:appcompat-v7:28.0.0' --> 'com.android.support:support-compat:28.0.0'

chcp 932をしないとreact-native run-androidが文字化けする。

native_background_timer\node_modules\react-native-maps\lib\android\build.gradle

dependencies {
  def googlePlayServicesVersion = safeExtGet('googlePlayServicesVersion', DEFAULT_GOOGLE_PLAY_SERVICES_VERSION)
  // Variable lookup order : googlePlayServicesMapsVersion > googlePlayServicesVersion > DEFAULT_GOOGLE_PLAY_SERVICES_MAPS_VERSION
  def googlePlayServicesMapsVersion = safeExtGet('googlePlayServicesMapsVersion', safeExtGet('googlePlayServicesVersion', DEFAULT_GOOGLE_PLAY_SERVICES_MAPS_VERSION))
  def androidMapsUtilsVersion = safeExtGet('androidMapsUtilsVersion', DEFAULT_ANDROID_MAPS_UTILS_VERSION)

  compileOnly "com.facebook.react:react-native:+"
  implementation "com.google.android.gms:play-services-base:$googlePlayServicesVersion"
  implementation "com.google.android.gms:play-services-maps:$googlePlayServicesMapsVersion"
  implementation "com.google.maps.android:android-maps-utils:$androidMapsUtilsVersion"
  //↓追加しないとrunできない
  implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"  
}
reactnative/react-native-maps.1553615859.txt.gz · 最終更新: 2019/03/27 00:57 by ips