I\'ve tried gradlew clean and every other solution available here and on GitHub but the error doesn\'t match and solution doesn\'t work
Error on cmd A
Do this:
Go to Android Studio
Open your project file
Click on Build
Click on Clean Project
Build again with react-native run-android
I have fixed by enabling the multiDex in the /android/app/build.gradle file.
android {
defaultConfig {
.......
multiDexEnabled true
}
......
}
Got same error a couple of days back, seems you've got to enable multidex to true and delete the build folder.
Go to android/app/build.gradle
and add the line multiDexEnabled true
and set minSdkVersion to 21 inside defaultConfig
like this
...
android{
...
defaultConfig {
...
minSdkVersion 21
multiDexEnabled true
}
...
}
...
You can check this thread out on react-native
https://github.com/oney/react-native-gcm-android/issues/32
I solve issue by enabling
android {
defaultConfig {
// ...
multiDexEnabled true
}
// ...
}
path : android/app/build.gradle
Add the below line to your android/build.gradle file
ext {
googlePlayServicesVersion = "16.0.1"
// ... rest of ext properties
}
https://github.com/idehub/react-native-google-analytics-bridge/wiki/Android-build-problems
Add following to your android/app/build.gradle
dependencies {
....
implementation 'com.android.support:design:27.1.0'
....
}