Git Product home page Git Product logo

Comments (15)

oney avatar oney commented on July 19, 2024

Can you try this demo project? And see whether the same error happens.
https://github.com/oney/TestGcm

from react-native-gcm-android.

 avatar commented on July 19, 2024

You must have some packages from "Extras" installed in android sdk, don't remember which ones.

from react-native-gcm-android.

jjingrong avatar jjingrong commented on July 19, 2024

Try adding

    multiDexEnabled true        

within the defaultConfig{} block, inside your android/app/build.gradle

from react-native-gcm-android.

jawadrehman avatar jawadrehman commented on July 19, 2024

you need to install Google Play Services and Google Repository from the android sdk
@isuvorov

from react-native-gcm-android.

jawadrehman avatar jawadrehman commented on July 19, 2024

@oney can you highlight this in your homepage

from react-native-gcm-android.

 avatar commented on July 19, 2024

Thing worth one more highlight is people should NOT multiDexEnable true even if someone advises them to.

from react-native-gcm-android.

jawadrehman avatar jawadrehman commented on July 19, 2024

@Herby can you give any insight on #3

from react-native-gcm-android.

 avatar commented on July 19, 2024

@jawadrehman I really don't know. That thing is strange. It was making problems in my project as well, now it does not and everything goes fine (though the '.json not found in root' message is still appearing during build).

from react-native-gcm-android.

oney avatar oney commented on July 19, 2024

@jawadrehman Sure, but how to install Google Play Services?

from react-native-gcm-android.

oney avatar oney commented on July 19, 2024

@Herby I will do

from react-native-gcm-android.

 avatar commented on July 19, 2024

@oney Re: how to install Google Play Services: In Windows as well as in OSX IIRC, Android SDK has this UI that manages installed parts, Google Play Services as well as Google Repository are one of the items thereof. IIRC in "Extras" section.

from react-native-gcm-android.

oney avatar oney commented on July 19, 2024

Run command android to open Android SDK Manager.
And find Google Play Services and Google Repository in Extras like below
SDK

It's super weird that it shows I don't install Google Play Services and Google Repository.

from react-native-gcm-android.

jawadrehman avatar jawadrehman commented on July 19, 2024

@oney they are installed, its just that there's an update available.

EDIT - This might have been because of latency on part of GCM. Didnt knew that it could be a bit slower compared to APNS . Thanks for your help .

btw, after loads of fiddling around i finally made it give me a gcm token. the only issue i have now is that the messages are only recieved on the device on first app launch (so not when say app is closed / app is in another view). is it because i have a kindle fire that i installed google play services on or is it an issue.

@Herby

from react-native-gcm-android.

oney avatar oney commented on July 19, 2024

@jawadrehman The communication between JS and native (Java) is paused when app is closed. I recommend you create a subclass of GcmListenerService to handle the notification.
Demo is oney/TestGcm@5fa3614

from react-native-gcm-android.

nachikettrivedi avatar nachikettrivedi commented on July 19, 2024

@jawadrehman @Herby @oney I have google play services and google repository already installed. I'm still facing the same error of: RNGcmAndroid' A problem occurred configuring project ':RNGcmAndroid'. Please guide.

from react-native-gcm-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.