Giter Club home page Giter Club logo

Comments (11)

abdallahm avatar abdallahm commented on June 29, 2024 5

i fixed it temporarily by replacing
compile 'com.google.android.gms:play-services-gcm:+'
with
compile ('com.google.android.gms:play-services-gcm:9.0.1') { force = true; }
in node_modules/react-native-device-info/android/build.gradle file

from react-native-device-info.

alfonsodev avatar alfonsodev commented on June 29, 2024 2

similar error here
C++ Exception in 'nativeRequireModuleConfig': java.lang.IllegalAccessError: Method 'void android.support.v4.content.ContextCompat.<init>()' is inaccessible to class 'com.google.android.gms.iid.zzd' (declaration of 'com.google.android.gms.iid.zzd' appears in /data/app/com.myapp-1/base.apk)

from react-native-device-info.

L3V147H4N avatar L3V147H4N commented on June 29, 2024

The same error appears on my phone with android 6.0.1
I installed the support Libraries:

image

Am I missing some SDK?

from react-native-device-info.

L3V147H4N avatar L3V147H4N commented on June 29, 2024

another error, simply by including the project in the build makes the debug mode in chrome crash

from react-native-device-info.

ospfranco avatar ospfranco commented on June 29, 2024

@abdallahm solution does not work for me, any other idea on how to solve this?

temporary fixes such as modifying the package are no good for me, since build is done remotely.

from react-native-device-info.

ospfranco avatar ospfranco commented on June 29, 2024

as mentioned by @L3V147H4N this only crashes on debug builds, release builds seem to build just fine

from react-native-device-info.

superandrew213 avatar superandrew213 commented on June 29, 2024

Getting same error as @alfonsodev on release builds. @abdallahm solution fixed it for me.

from react-native-device-info.

swaroopa94 avatar swaroopa94 commented on June 29, 2024

Hi I am getting the same error but the solution did not work for me any other idea on how to solve this?

from react-native-device-info.

CodyMcArthur avatar CodyMcArthur commented on June 29, 2024

I wasted a day on this and just got it fixed up. In case it helps anyone - mine was all about the compile 'com.google.android.gms:play-services-gcm:+' ...like abdallahm was saying.

You will only need to change these lines in the build.gradle of their respective package, not the main project build gradle.

Mine originally looked like this:
compile 'com.google.android.gms:play-services-gcm:8.4.3'

I changed it to this:
compile ('com.google.android.gms:play-services-gcm:9.0.1') ..note the brackets and new version:

I also had some other packages in my project that were using things like (this is a package that includes a map):
compile 'com.google.android.gms:play-services-maps:8.4.3'
compile 'com.google.android.gms:play-services-location:8.4.3'

So I changed them to:
compile 'com.google.android.gms:play-services-maps:9.0.1' ..just changed the version
compile 'com.google.android.gms:play-services-location:9.0.1'

Also, if you use compile this line in any packages, make sure the version number matches:
compile 'com.android.support:appcompat-v7:23.1.1'

Sync -Clean - Make Project - Run and bask in the glory!

from react-native-device-info.

ospfranco avatar ospfranco commented on June 29, 2024

@CodyMcArthur if you change it on their respective projects it will only work on your machine, next time you install the dependencies (or on other peoples machines) you won't have the changes, or am I understanding this incorrectly?

from react-native-device-info.

machour avatar machour commented on June 29, 2024

Documented how to disable com.google.android.gms in the troubleshooting section.
Will probably be dropped with next BC breaking release.

Closing this old issue that was about something else.

from react-native-device-info.

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.