ユーザ用ツール

サイト用ツール


reactnative:react-native-maps

差分

この文書の現在のバージョンと選択したバージョンの差分を表示します。

この比較画面にリンクする

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
reactnative:react-native-maps [2019/03/27 01:00]
ips
reactnative:react-native-maps [2019/03/30 09:49] (現在)
ips
ライン 27: ライン 27:
  
 Step 2. Add the API key to your app Step 2. Add the API key to your app
-native_background_timer\android\app\src\main\AndroidManifest.xml 
  
 +native_background_timer\android\app\src\main\AndroidManifest.xml にmeta-data追加
 <​code>​ <​code>​
 ・・・ ・・・
ライン 39: ライン 39:
     </​application>​     </​application>​
 </​code>​ </​code>​
 +
 +===== react-native run-androidの文字化け =====
 +
 +
 +<​html>​chcp 932</​html>​をしないと<​html>​react-native run-android</​html>​が文字化けする。
 +
 ===== エラー ===== ===== エラー =====
 <​code>​ <​code>​
ライン 52: ライン 58:
 </​code>​ </​code>​
  
-<​html>​chcp 932</​html>​をしないと<​html>​react-native run-android</​html>​が文字化けする。 +native_background_timer\node_modules\react-native-maps\lib\android\build.gradleに追加 ※ファイルの場所に注意 
- + ↓
-native_background_timer\node_modules\react-native-maps\lib\android\build.gradle+
 <​code>​ <​code>​
 dependencies { dependencies {
ライン 71: ライン 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}}
reactnative/react-native-maps.1553616044.txt.gz · 最終更新: 2019/03/27 01:00 by ips