Hi,
I'm experiencing problems running an Ignite App using maps.
I've scaffolded the app using:
$ npm install -g ignite-cli
$ ignite new PizzaApp
$ cd PizzaApp
$ ignite add maps
$ ignite add vector-icons
$ ignite generate screen PizzaLocationList
$ ignite generate component PizzaLocation
$ ignite generate map StoreLocator
$ ignite add i18n
Afterwards I added the Google Maps API key to the Android Manifest.
Go to developer screen, and click plugin examples.
running react-native log-android outputs:
--------- beginning of crash
04-11 12:10:29.218 3686 3717 W ReactNativeJS: 'import takeLatest from \'redux-saga\' has been deprecated in favor of import takeLatest from \'redux-saga/effects\'.\nThe latter will not work with yield*, as helper effects are wrapped automatically for you in fork effect.\nTherefore yield takeLatest will return task descriptor to your saga and execute next lines of code.', ''
04-11 12:10:29.218 3686 3717 W ReactNativeJS: 'import takeLatest from \'redux-saga\' has been deprecated in favor of import takeLatest from \'redux-saga/effects\'.\nThe latter will not work with yield*, as helper effects are wrapped automatically for you in fork effect.\nTherefore yield takeLatest will return task descriptor to your saga and execute next lines of code.', ''
04-11 12:10:29.218 3686 3717 W ReactNativeJS: 'import takeLatest from \'redux-saga\' has been deprecated in favor of import takeLatest from \'redux-saga/effects\'.\nThe latter will not work with yield*, as helper effects are wrapped automatically for you in fork effect.\nTherefore yield takeLatest will return task descriptor to your saga and execute next lines of code.', ''
04-11 12:10:29.218 3686 3717 W ReactNativeJS: 'import takeLatest from \'redux-saga\' has been deprecated in favor of import takeLatest from \'redux-saga/effects\'.\nThe latter will not work with yield*, as helper effects are wrapped automatically for you in fork effect.\nTherefore yield takeLatest will return task descriptor to your saga and execute next lines of code.', ''
04-11 12:10:29.224 3686 3717 I ReactNativeJS: Running application "PizzaApp" with appParams: {"initialProps":{},"rootTag":1}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF
04-11 12:10:42.426 3686 3717 I ReactNativeJS: 'Navigation Dispatch: ', { action:
04-11 12:10:42.426 3686 3717 I ReactNativeJS: { type: 'Navigation/NAVIGATE',
04-11 12:10:42.426 3686 3717 I ReactNativeJS: routeName: 'PluginExamplesScreen',
04-11 12:10:42.426 3686 3717 I ReactNativeJS: params: undefined,
04-11 12:10:42.426 3686 3717 I ReactNativeJS: action: undefined },
04-11 12:10:42.426 3686 3717 I ReactNativeJS: newState:
04-11 12:10:42.426 3686 3717 I ReactNativeJS: { index: 1,
04-11 12:10:42.426 3686 3717 I ReactNativeJS: routes:
04-11 12:10:42.426 3686 3717 I ReactNativeJS: [ { routeName: 'PresentationScreen', key: 'Init' },
04-11 12:10:42.426 3686 3717 I ReactNativeJS: { type: 'Navigation/NAVIGATE',
04-11 12:10:42.426 3686 3717 I ReactNativeJS: routeName: 'PluginExamplesScreen',
04-11 12:10:42.426 3686 3717 I ReactNativeJS: params: undefined,
04-11 12:10:42.426 3686 3717 I ReactNativeJS: action: undefined,
04-11 12:10:42.426 3686 3717 I ReactNativeJS: index: 0,
04-11 12:10:42.426 3686 3717 I ReactNativeJS: routes: [ { routeName: 'PluginExamplesScreen', key: 'Init' } ],
04-11 12:10:42.426 3686 3717 I ReactNativeJS: key: 'id-1491912629194-0' } ] },
04-11 12:10:42.426 3686 3717 I ReactNativeJS: lastState:
04-11 12:10:42.426 3686 3717 I ReactNativeJS: { index: 0,
04-11 12:10:42.426 3686 3717 I ReactNativeJS: routes: [ { routeName: 'PresentationScreen', key: 'Init' } ] } }
ignite doctor results:
System
platform win32
arch x64
cpu 8 cores Intel(R) Core(TM ) i7-4710MQ CPU @ 2.50GHz
directory C:\Users\ME\ReactNative\PizzaApp
JavaScript
node 7.8.0 C:\Program Files\nodejs\node.EXE
npm 4.2.0 C:\Program Files\nodejs\npm.CMD
yarn 0.21.3 C:\Program Files (x86)\Yarn\bin\yarn.CMD
React Native
react-native-cli 2.0.1
app rn version 0.42.0
Ignite
ignite 2.0.0-beta.8 C:\Program Files\nodejs\ignite.CMD
Android
java - C:\Program Files\Java\jdk1.8.0_74\bin\java.EXE
android home - C:\Users\ME\AppData\Local\Android\sdk1
Same problem for me. App has stopped working
I ran a adb logcat and the error logged led me to the following solution:
Go to android/app/build.gradle and replace these lines:
compile 'com.google.android.gms:play-services-base:10.2.0'
compile 'com.google.android.gms:play-services-maps:10.2.0'
with these:
compile "com.google.android.gms:play-services-base:+"
compile 'com.google.android.gms:play-services-maps:+'
Ya there's often conflicts between play services related things. It's a bit frustrating to be honest.
I'm glad the + works. I find that a bit brittle though as you can get a version you don't expect or that may have bugs (like 10.0.0 or <9.6.1).
I think it was react-native-device-info and react-native-maps conflicting in the past.
@skellock - does Ignite 2 insert the code to help enforce maps working? If not that might help here.
ignite-maps inserts 10.2.0, yes. However @DanielAndersen mentioned that was the problem. My guess is that react-native-maps or react-native-device-info changed something recently that makes it incompatible again.
@DanielAndersen If you haven't figured this out yet, feel free to file an issue over at https://github.com/infinitered/ignite-maps. That's the best place for maps-related issues.
Recommend re-opening over at ignite-maps if it's still an issue.
Most helpful comment
I ran a
adb logcatand the error logged led me to the following solution:Go to android/app/build.gradle and replace these lines:
with these: