この文書の現在のバージョンと選択したバージョンの差分を表示します。
両方とも前のリビジョン 前のリビジョン | |||
reactnative:react-native-maps [2019/03/27 01:02] ips |
reactnative:react-native-maps [2019/03/30 09:49] (現在) ips |
||
---|---|---|---|
ライン 76: | ライン 76: | ||
</code> | </code> | ||
+ | ==== react-native run-androidをするとすぐおちる ==== | ||
+ | |||
+ | [[https://github.com/react-native-community/react-native-maps/issues/2766|Blank map on android device #2766]] | ||
+ | |||
+ | <code> | ||
+ | > adb logcat | findstr "Google Maps Android API" // windowsなのでgrepがない | ||
+ | ・・・ | ||
+ | 03-29 22:27:58.592 6007 6066 E AndroidRuntime: Process: com.native_background_timer, PID: 6007 | ||
+ | 03-29 22:27:58.592 6007 6066 E AndroidRuntime: java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/ProtocolVersion; | ||
+ | ・・・ | ||
+ | </code> | ||
+ | |||
+ | ↓を参考にして native_background_timer\android\app\build.gradle に追加 | ||
+ | [[https://github.com/react-native-community/react-native-maps/issues/818|Failed resolution of com.google.android.gms.maps.GoogleMapOptions #818]] | ||
+ | |||
+ | <code> | ||
+ | android { | ||
+ | compileSdkVersion rootProject.ext.compileSdkVersion | ||
+ | |||
+ | ・・・ | ||
+ | } | ||
+ | |||
+ | defaultConfig { | ||
+ | applicationId "com.native_background_timer" | ||
+ | minSdkVersion rootProject.ext.minSdkVersion | ||
+ | targetSdkVersion rootProject.ext.targetSdkVersion | ||
+ | versionCode 2 | ||
+ | versionName "1.1" | ||
+ | multiDexEnabled true // ADD | ||
+ | } | ||
+ | |||
+ | dependencies { | ||
+ | implementation project(':react-native-maps') | ||
+ | implementation ("com.google.android.gms:play-services-maps:+") { // ADD | ||
+ | force = true; // ADD | ||
+ | } // ADD | ||
+ | implementation 'com.android.support:multidex:1.0.0' // ADD | ||
+ | implementation project(':react-native-background-timer') | ||
+ | implementation fileTree(dir: "libs", include: ["*.jar"]) | ||
+ | implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}" | ||
+ | implementation "com.facebook.react:react-native:+" // From node_modules | ||
+ | |||
+ | } | ||
+ | </code> | ||
+ | |||
+ | {{:reactnative:pasted:20190330-094948.png}} |