My app's build fails because of react-native-lock which is a deprecated library. But this happens in android only. It builds and runs successfully on iOS. It gives the following error:
Task :react-native-lock:compileDebugJavaWithJavac FAILED /Users/abc/appname/node_modules/react-native-lock/android/src/main/java/com/auth0/lock/react/LockReactPackage.java:146: error: method does not override or implement a method from a supertype
#Override
^
Note: /Users/abc/appname/node_modules/react-native-lock/android/src/main/java/com/auth0/lock/react/bridge/UserProfileBridge.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
I am stuck over this issue for so long. Any help would be highly appreciated. Its app/build.gradle looks like this:
dependencies {
compile project(':realm')
implementation project(':realm')
compile project(':react-native-vector-icons')
implementation project(':react-native-vector-icons')
compile project(':react-native-lock')
implementation project(':react-native-lock')
compile project(':react-native-firebase')
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:28.0.0"
implementation "com.facebook.react:react-native:+" // From node_modules
implementation project(':react-native-firebase')
}
My package.json dependencies are as follows:
"dependencies": {
"#expo/ex-navigation": "^3.1.0",
"babel-preset-react-native-stage-0": "^1.0.1",
"firebase": "^4.8.0",
"moment": "^2.22.1",
"react": "16.0.0",
"react-moment": "^0.7.0",
"react-native": "0.55.0",
"react-native-firebase": "^5.2.3",
"react-native-loading-spinner-overlay": "^0.5.2",
"react-native-lock": "^0.4.0",
"react-native-popup-dialog": "^0.16.6",
"react-native-step-indicator": "0.0.7",
"react-native-swipe-list-view": "^1.3.1",
"react-native-vector-icons": "^4.4.2",
"react-redux": "^5.0.6",
"realm": "^10.0.0-beta.6",
"redux": "^3.7.2",
"redux-thunk": "^2.2.0"
},
Its project level build.gradle:
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0'
classpath 'com.google.gms:google-services:4.0.1'
}
The gradle version which I am using is 4.9. The JDK version is 11.
Are you using this depreciated library for Biometrics?
Related
I'm developing a mobile app and everything was working fine, building even made ./gradlew bundleRelease, everything was working, and then suddenly this error:
* What went wrong:
Execution failed for task ':app:checkDebugDuplicateClasses'.
> 1 exception was raised by workers:
java.lang.RuntimeException: Duplicate class kotlin.collections.jdk8.CollectionsJDK8Kt found in modules jetified-kotlin-stdlib-1.8.0.jar (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk8-1.4.10.jar (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10)
Duplicate class kotlin.internal.jdk7.JDK7PlatformImplementations found in modules jetified-kotlin-stdlib-1.8.0.jar (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk7-1.4.10.jar (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.10)
Duplicate class kotlin.internal.jdk8.JDK8PlatformImplementations found in modules jetified-kotlin-stdlib-1.8.0.jar (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk8-1.4.10.jar (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10)
Duplicate class kotlin.jdk7.AutoCloseableKt found in modules jetified-kotlin-stdlib-1.8.0.jar (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk7-1.4.10.jar (org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.10)
Duplicate class kotlin.random.jdk8.PlatformThreadLocalRandom found in modules jetified-kotlin-stdlib-1.8.0.jar (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk8-1.4.10.jar (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10)
Duplicate class kotlin.streams.jdk8.StreamsKt found in modules jetified-kotlin-stdlib-1.8.0.jar (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk8-1.4.10.jar (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10)
Duplicate class kotlin.streams.jdk8.StreamsKt$asSequence$$inlined$Sequence$1 found in modules jetified-kotlin-stdlib-1.8.0.jar (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk8-1.4.10.jar (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10)
Duplicate class kotlin.streams.jdk8.StreamsKt$asSequence$$inlined$Sequence$2 found in modules jetified-kotlin-stdlib-1.8.0.jar (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk8-1.4.10.jar (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10)
Duplicate class kotlin.streams.jdk8.StreamsKt$asSequence$$inlined$Sequence$3 found in modules jetified-kotlin-stdlib-1.8.0.jar (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk8-1.4.10.jar (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10)
Duplicate class kotlin.streams.jdk8.StreamsKt$asSequence$$inlined$Sequence$4 found in modules jetified-kotlin-stdlib-1.8.0.jar (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk8-1.4.10.jar (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10)
Duplicate class kotlin.text.jdk8.RegexExtensionsJDK8Kt found in modules jetified-kotlin-stdlib-1.8.0.jar (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk8-1.4.10.jar (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10)
Duplicate class kotlin.time.jdk8.DurationConversionsJDK8Kt found in modules jetified-kotlin-stdlib-1.8.0.jar (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk8-1.4.10.jar (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10)
This is my versions:
ext {
buildToolsVersion = "30.0.3"
minSdkVersion = 21
compileSdkVersion = 30
targetSdkVersion = 30
kotlinVersion = "1.4.10"
RNNKotlinVersion = kotlinVersion
playServicesVersion = "16.0.0"
googlePlayServicesVersion = "17.0.0"
}
...
...
...
dependencies {
classpath 'com.android.tools.build:gradle:4.0.1' // after
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
// classpath 'com.google.gms:google-services:3.2.1'
classpath 'com.google.gms:google-services:4.2.0'
classpath 'io.fabric.tools:gradle:1.+'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
build.gradle file
These are my dependancies:
"dependencies": {
"#invertase/react-native-apple-authentication": "^2.2.2",
"#notifee/react-native": "^0.5.1",
"#react-native-community/async-storage": "^1.9.0",
"#react-native-community/geolocation": "^2.0.2",
"#react-native-community/netinfo": "2.0.10",
"#react-native-community/picker": "^1.8.1",
"axios": "^0.19.2",
"immutable": "^4.0.0-rc.12",
"libphonenumber-js": "^1.7.50",
"lodash": "^4.17.15",
"lottie-ios": "3.1.8",
"lottie-react-native": "^3.5.0",
"mobx": "^5.15.4",
"mobx-react": "^6.1.8",
"mobx-state-tree": "^3.15.0",
"moment": "^2.26.0",
"native-base": "^2.13.12",
"react": "^16.12.0",
"react-devtools-core": "3",
"react-native": "0.61.5",
"react-native-android-location-enabler": "1.1.0",
"react-native-axios": "^0.17.1",
"react-native-calendars": "^1.265.0",
"react-native-datepicker": "^1.7.0",
"react-native-dropdown-picker": "^5.4.4",
"react-native-fast-image": "^8.1.5",
"react-native-fbsdk": "^3.0.0",
"react-native-firebase": "^5.6.0",
"react-native-geolocation-service": "^5.0.0",
"react-native-gesture-handler": "^1.6.0",
"react-native-google-signin": "^2.1.1",
"react-native-ibm-mobilefirst": "^8.0.2021040715",
"react-native-inappbrowser-reborn": "^3.4.0",
"react-native-maps": "^0.27.1",
"react-native-navigation": "6.4.0",
"react-native-navigation-hooks": "^5.0.0",
"react-native-phone-call": "^1.0.9",
"react-native-picker-select": "^8.0.4",
"react-native-shadow": "^1.2.2",
"react-native-swipeable": "^0.6.0",
"react-native-vector-icons": "^6.6.0",
"react-native-webview": "^9.2.2",
"react-redux": "^7.2.0",
"redux": "^4.0.5",
"redux-persist": "^6.0.0",
"redux-saga": "^1.1.3",
"reselect": "^4.0.0"
}
package.json file
This is implementations:
dependencies {
implementation project(':react-native-geolocation-service')
implementation project(':lottie-react-native')
implementation project(':react-native-android-location-enabler')
implementation project(':#react-native-community_netinfo')
implementation project(':#notifee_react-native')
implementation project(':react-native-webview')
//Add these lines
implementation project(':react-native-firebase')
implementation "com.google.android.gms:play-services-base:16.1.0"
implementation "com.google.firebase:firebase-core:19.0.0"
implementation "com.google.firebase:firebase-messaging:18.0.0"
implementation "com.google.firebase:firebase-dynamic-links:19.0.0"
implementation "com.google.firebase:firebase-invites:17.0.0"
implementation "com.google.firebase:firebase-auth:17.0.0"
implementation project(':react-native-inappbrowser-reborn')
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:customtabs:28.0.0'
implementation 'com.google.android.gms:play-services-wallet:16.0.1'
compile project(':oppwa.mobile-2.49.0')
implementation project(':react-native-fast-image')
implementation project(':#react-native-community_async-storage')
implementation project(':react-native-navigation')
implementation project(':#react-native-community_geolocation')
implementation project(':react-native-maps')
implementation 'com.android.support:multidex:1.0.3'
// implementation "com.google.android.gms:play-services-base:15.0.0"
implementation 'com.google.android.gms:play-services-maps:16.1.0'
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.facebook.react:react-native:+"
implementation project(path: ':oppwa.mobile-2.49.0') // From node_modules
if (enableHermes) {
def hermesPath = "../../node_modules/hermes-engine/android/";
debugImplementation files(hermesPath + "hermes-debug.aar")
releaseImplementation files(hermesPath + "hermes-release.aar")
} else {
implementation jscFlavor
}
}
Can you help me guys?
I tries the most of what is offered in this and other sites. Nothing helped.
Everything was working fine, and suddenly this happened.
I suddenly got an error saying Execution failed for task ':app:processDebugResources'.
Problems reading data from Binary store in C:\Users\prabh\AppData\Local\Temp\gradle13962421950392783403.bin offset 114265 exists? true
I think this error is related to react native firebase. I am using react-native-firebase/app,firebase/auth,firebase/messaging packages. I am using these packages from long time but never faced an issue before. The only thing I did hours before getting this error is npm audit fix to fix some vulnerabulities. Anyone got a similar error?
build.gradle dependencies:
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.facebook.react:react-native:+" // From node_modules
implementation 'com.google.firebase:firebase-analytics:17.3.0' //For Notifications
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
implementation project(':react-native-vector-icons')
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.0.0' // <-- add this; newer versions should work too
implementation project(':react-native-fs') //addes Manually compile project
implementation project(':react-native-get-real-path')
implementation 'com.facebook.fresco:fresco:2.0.0'
// For animated GIF support
implementation 'com.facebook.fresco:animated-gif:2.0.0'
// For WebP support, including animated WebP
implementation 'com.facebook.fresco:animated-webp:2.0.0'
implementation 'com.facebook.fresco:webpsupport:2.0.0'
This is worked for me on Windows 10 and Android. I didn't try on Mac or Linux.
I saw that from https://github.com/gradle/gradle/issues/8489 #jack7891
Thank you jack.
android/build.gradle
classpath 'com.google.gms:google-services:4.3.4' to classpath 'com.google.gms:google-services:4.3.5'
android/app/build.gradle
implementation 'com.google.firebase:firebase-analytics:17.3.0' to implementation 'com.google.firebase:firebase-analytics:18.0.2'
package.json
"#react-native-firebase/app": "^11.1.2",
"#react-native-firebase/auth": "^11.1.2",
"#react-native-firebase/firestore": "^11.1.2",
"#react-native-firebase/storage": "^11.1.2",
"#react-native-firebase/messaging": "^11.1.2",
"react-native-push-notification": "^7.2.3",
to
"#react-native-firebase/app": "^11.5.0",
"#react-native-firebase/auth": "^11.5.0",
"#react-native-firebase/firestore": "^11.5.0",
"#react-native-firebase/storage": "^11.5.0",
"#react-native-firebase/messaging": "^11.5.0",
"react-native-push-notification": "^7.3.1",
Then run npm install or yarn install
After that, go to android project folder and run:
./gradlew.bat clean
Finally, you can go to project folder and run npx react-native run-android
I use react-native-google-fit package to get the steps data about the user. In my case this package works fine in some devices but in some others cant get any data or response from the google-fit API.
I cant understand what is the problem, as I know step recording api of the google-fit is not implemented in default as it is in IOS(health-kit). I implemented bugnsag to track the steps and the process stucks when I call google-fit API to get step samples. No error or exception thrown it just feels like hanging.
If anyone have some idea or solution about it I would be very happy to hear.
package.json
"dependencies": {
"#bugsnag/react-native": "^7.3.2",
"#react-native-community/art": "^1.2.0",
"#react-native-community/async-storage": "^1.8.1",
"#react-native-community/cli-platform-ios": "^4.10.1",
"#react-native-community/datetimepicker": "^3.0.1",
"#react-native-community/masked-view": "^0.1.7",
"#react-native-community/viewpager": "^4.1.0",
"#react-native-firebase/app": "^7.1.0",
"#react-native-firebase/messaging": "^7.1.0",
"#react-navigation/native": "^5.0.9",
"#react-navigation/stack": "^5.1.1",
"axios": "^0.19.2",
"dayjs": "^1.8.33",
"firebase": "^7.14.6",
"localized-strings": "^0.2.4",
"react": "16.9.0",
"react-native": "^0.61.5",
"react-native-device-info": "^5.5.7",
"react-native-document-picker": "^3.5.4",
"react-native-dots-pagination": "^0.1.9",
"react-native-fs": "^2.16.6",
"react-native-gesture-handler": "^1.6.0",
"react-native-get-random-values": "^1.3.1",
"react-native-gifted-chat": "^0.16.1",
"react-native-google-fit": "^0.13.0",
"react-native-highlight-words": "^1.0.1",
"react-native-image-picker": "^2.3.1",
"react-native-onesignal": "^3.9.0",
"react-native-progress": "^4.1.2",
"react-native-reanimated": "^1.7.0",
"react-native-safe-area-context": "^0.7.3",
"react-native-screens": "^2.3.0",
"react-native-vector-icons": "^6.6.0",
"react-native-video": "^4.4.5",
"react-native-webview": "^9.1.4",
"react-navigation": "^4.2.2",
"react-navigation-stack": "^2.2.3",
"react-navigation-tabs": "^2.8.13",
"react-redux": "^7.2.0",
"redux": "^4.0.5",
"redux-logger": "^3.0.6",
"redux-saga": "^1.1.3",
"rn-apple-healthkit": "^0.8.0"
},
android/build.gradle
buildscript {
ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 16
compileSdkVersion = 28
targetSdkVersion = 28
}
repositories {
google()
jcenter()
}
dependencies {
classpath("com.android.tools.build:gradle:3.4.2")
classpath('com.google.gms:google-services:4.3.3')
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenLocal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
google()
jcenter()
maven { url 'https://jitpack.io' }
}
}
android/app/build.gradle
defaultConfig {
applicationId "com.xx"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 29
versionName "1.4.18"
multiDexEnabled true
}
dependencies {
implementation project(':react-native-webview')
implementation project(':react-native-vector-icons')
implementation project(':react-native-fs')
implementation 'com.google.firebase:firebase-analytics:17.2.2'
implementation "com.android.support:support-core-utils:28.0.0"
implementation "com.android.support:appcompat-v7:28.0.0"
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.facebook.react:react-native:+"
android.xml permissions
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACTIVITY_RECOGNITION"/>
function that calls google-fit-api
function getStepsForAndroid(startDate, endDate) {
const options = {
startDate: new Date(startDate).toISOString(), // required ISO8601Timestamp
endDate: new Date(endDate).toISOString() // required ISO8601Timestamp
};
return GoogleFit.getDailyStepCountSamples(options)
}
Well I solved the issue.. Still its very weird issue but, first of course its my fault to not check documentation again. Seconds its bad documentation and naming.. Like how you can write READ_WRITE and it can only mean WRITE?
scopes: [
Scopes.FITNESS_ACTIVITY_READ_WRITE,
Scopes.FITNESS_BODY_READ_WRITE,
],
Its very wrong documentation because just after these example it shows how to retrieve steps(as I just followed those). So instead of top I added two extra permissions and the problem is solved.
scopes: [
Scopes.FITNESS_ACTIVITY_READ,
Scopes.FITNESS_ACTIVITY_READ_WRITE,
Scopes.FITNESS_BODY_READ,
Scopes.FITNESS_BODY_READ_WRITE,
],
So this small issue cost me like few weeks which is actually still unlogical because it worked with only two permissions in half of the devices.. Also I google-fit API has problem because in this case this API could fail and we could catch the error and understand that its the problem of lack of permissions.
Suddenly got this build error (out of nowhere) which worked well in the morning.
I tried enabling AndroidX flags, but got ViewCompat class not found issue. So I rolled it back. I didn't make any changes since yesterday and it had no issues at all until today.
Is it because of this release?
Would be great if someone could help out.
* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute application#appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:7:5-117 to override.
// package.json
"dependencies": {
"accordion-collapse-react-native": "^0.1.9",
"accounting-js": "^1.1.1",
"appcenter": "2.0.0",
"appcenter-analytics": "2.0.0",
"appcenter-crashes": "2.0.0",
"appcenter-push": "2.0.0",
"axios": "^0.18.0",
"fusioncharts": "^3.13.5",
"immutability-helper": "^3.0.0",
"lodash": "^4.17.11",
"lottie-react-native": "^2.5.11",
"moment": "^2.24.0",
"react": "16.8.3",
"react-native": "0.59.8",
"react-native-app-link": "^1.0.0",
"react-native-base64": "0.0.2",
"react-native-camera": "^2.9.0",
"react-native-charts-wrapper": "^0.5.1",
"react-native-check-box": "^2.1.7",
"react-native-code-push": "^5.6.0",
"react-native-device-info": "^2.0.1",
"react-native-elements": "^1.1.0",
"react-native-gesture-handler": "^1.1.0",
"react-native-keyboard-aware-scroll-view": "^0.8.0",
"react-native-material-dropdown": "^0.11.1",
"react-native-modal": "^11.0.1",
"react-native-orientation": "^3.1.3",
"react-native-paper": "^2.15.0",
"react-native-photo-upload": "^1.3.0",
"react-native-picker-select": "^6.1.1",
"react-native-select-input-ios": "^2.0.2",
"react-native-svg": "^9.4.0",
"react-native-svg-uri": "^1.2.3",
"react-native-vector-icons": "^6.4.2",
"react-native-webview": "^5.12.0",
"react-navigation": "^3.8.1",
"react-redux": "^6.0.1",
"redux": "^4.0.1",
"redux-thunk": "^2.3.0"
},
dependencies {
implementation project(':appcenter')
implementation project(':appcenter-crashes')
implementation project(':appcenter-analytics')
implementation project(':react-native-orientation')
implementation project(':react-native-webview')
implementation project(':lottie-react-native')
implementation project(':appcenter-push')
implementation project(':react-native-device-info')
implementation project(':react-native-fs')
implementation project(':react-native-image-resizer')
implementation project(':react-native-image-picker')
implementation project(':react-native-camera')
implementation project(':react-native-code-push')
implementation project(':react-native-svg')
implementation project(':react-native-gesture-handler')
implementation project(':react-native-vector-icons')
implementation 'com.facebook.fresco:animated-gif:1.10.0'
implementation "com.google.android.gms:play-services-base:16.0.1"
implementation ("com.google.firebase:firebase-core:16.0.6")
implementation('com.google.firebase:firebase-messaging:17.3.4')
implementation ('com.google.firebase:firebase-iid:17.0.4') {
force = true
}
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation "com.facebook.react:react-native:+" // From node_modules
}
I just came across the same issue this morning as well.
I resolved it by updating both react-native-app-auth and react-native-device-info to their latest versions.
npm install react-native-app-auth && npm install react-native-device-info
OR
yarn add react-native-app-auth && yarn add react-native-device-info
No need to update to AndroidX.
I always encounter this error when I try to run my app on an android device. I followed the RNFirebase instruction step by step to add it to my existing project, but it just doesn`t work.
> Task :app:processDebugGoogleServices
Parsing json file: /Users/myname/Documents/myname/Programmierungen/Project/android/app/google-services.json
> Task :react-native-firebase:compileDebugJavaWithJavac FAILED
/Users/myname/Documents/myname/Programmierungen/Project/node_modules/react-native-firebase/android/src/main/java/io/invertase/firebase/perf/RNFirebasePerformance.java:50: error: cannot access zzf
promise.resolve(getOrCreateTrace(identifier).getAttribute(attribute));
^
class file for com.google.android.gms.internal.firebase-perf.zzf not found
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
FAILURE: Build failed with an exception
It works fine with ios, just compiling for android does not work.
My /app/build.gradle dependencies: (Yes, I did add the apply plugin at the very bottom)
implementation project(':react-native-firebase')
implementation "com.google.android.gms:play-services-base:15.0.1"
implementation "com.google.firebase:firebase-core:16.0.3"
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation "com.facebook.react:react-native:+" // From node_modules
The android/build.gradle-dependencies:
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
classpath 'com.google.gms:google-services:4.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
and allprojects:
allprojects {
repositories {
mavenLocal()
google()
jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
}
}
Other useful information:
"dependencies": {
"babel-preset-react-native": "^4.0.0",
"react": "16.5.0",
"react-native": "^0.57.1",
"react-native-firebase": "^5.0.0"
},
"devDependencies": {
"#babel/core": "^7.1.2",
"#babel/runtime": "^7.1.2",
"babel-jest": "23.6.0",
"jest": "23.6.0",
"metro-react-native-babel-preset": "0.47.0",
"react-test-renderer": "16.5.0"
},
"jest": {
"preset": "react-native"
}
I`m coding on macos Mojave with Java 8.
Thanks for helping!! ':D