oney / react-native-gcm-android

GCM for React Native Android
MIT License
172 stars 76 forks source link

Android GCM permission request crashes app #23

Closed AdamGorkoz closed 8 years ago

AdamGorkoz commented 8 years ago

Hi all ,

I've followed the setup guide and installed all that is needed but i've encountered a problem where when this line runs : GcmAndroid.requestPermissions(); the application crashes.

any ideas ?

oney commented 8 years ago

Please run adb logcat in terminal to get some logs when the app crashes

AdamGorkoz commented 8 years ago

Got this log : image

Cant really make anything of it

oney commented 8 years ago

You have android/app/google-services.json file, right?

AdamGorkoz commented 8 years ago

I was missing that file , but now i have a different error while running react-native run-android :

image

and in the packager : image

oney commented 8 years ago

Please try cleaning the project

cd android
./gradlew clean
AdamGorkoz commented 8 years ago

Ok that did the trick , But i'm not getting the token though , Should this work on an emulator (using genymotion) ?

oney commented 8 years ago

No, it doesn't work on Genymotion if you don't install Google Play service on it. https://github.com/oney/react-native-gcm-android/issues/21#issuecomment-169751762

oney commented 8 years ago

If you still have problem, please reopen it. Thanks!