I cant seem to build my app on Android Studio. Below was the build output.
Error:FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:preDebugAndroidTestBuild'. > Conflict with dependency 'com.google.firebase:firebase-messaging' in project ':app'. Resolved versions for app (15.0.2) and test app (12.0.1) differ. See https://d.android.com/r/tools/test-apk-dependency-conflicts.html for details. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 23s
Here is the build.gradle file contents.
I notice in the external libraries, I have a conflict
I found out that I can generate the apk (Build APK) eventhough gradle produce the conflict error. The way to remove gradle error is to remove/comment this line:
but then APK wont compile. It used to work, I realized this problem may have happened after I had to include Firebase in another project (cordova based Android app) that used the same Android Studio. This problem does not happen to my other colleague machine. How do I really solve this ? Thanks