Comments (11)
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.
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.
The same error appears on my phone with android 6.0.1
I installed the support Libraries:
Am I missing some SDK?
from react-native-device-info.
another error, simply by including the project in the build makes the debug mode in chrome crash
from react-native-device-info.
@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.
as mentioned by @L3V147H4N this only crashes on debug builds, release builds seem to build just fine
from react-native-device-info.
Getting same error as @alfonsodev on release builds. @abdallahm solution fixed it for me.
from react-native-device-info.
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.
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.
@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.
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)
- Could not find Fiber with id "473" HOT 1
- Constant manifest is deprecated HOT 1
- Docs are not correct regaring getUniqueId HOT 2
- Android app crashing on start-up due to NullPointerException at com.android.installreferrer.api.onServiceConnected HOT 6
- [Feature] Request device date and time automatically is enabled or disabled (solved -> use react-native-localize) HOT 2
- Problem with submitting application to Google Play because of the usage of getLine1Number inside the library HOT 4
- Unable to get mobile number using getPhoneNumber() method for specific network providers HOT 1
- v10.13.0 import of `UIUserInterfaceIdiomVision` breaks Expo builds HOT 10
- Error starting expo HOT 1
- PRIVACY MANIFEST FILE FOR IOS HOT 21
- RNDeviceInfo is null on Android and react-native HOT 8
- getUniqueId() on Android returns null occasionnaly on same device HOT 1
- RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED - Android SDK 34+ HOT 2
- Need to have googlePlayServicesVersion = "21.0.1" HOT 5
- Could not get unknown property 'com' for extension 'android' of type com.android.build.gradle.LibraryExtension. HOT 1
- Get information about auto time and auto timezone HOT 1
- Components that depend on useIsHeadphonesConnected on Android don't re-render when bluethooth headphones are connected/disconnected. HOT 4
- DeviceInfo.isHeadphonesConnected() doesn't detect all ways headphones can be connected on iOS HOT 1
- NativeModule 中的 onCatalystInstanceDestroy() 已过时, 且标记为待删除 HOT 1
- Invariant Violation: `new NativeEventEmitter()` requires a non-null argument., js engine: hermes HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-device-info.