The library com.google.android.gms:play-services-measurement-base is being requested by various other libraries at [[16.5.0,16.5.0], [16.4.0,16.4.0]], but resolves to 16.5.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
For the moment, as dpa99c mentions in that PR, if you need to build, youâll have to installed the fixed plugin from the fork mentioned in that issue. Should allow you to build again until the next version of the plugin is released.
Then, for now, this is the solution and it works for me
I followed the indications of @Uehara but I still can not build properly. I have this error:
* What went wrong:
In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[11.0.
1]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.
Dependency failing: com.google.android.gms:play-services-tagmanager-v4-impl:11.0.1 -> com.google.android.gms:play-servic
es-basement@[11.0.1], but play-services-basement version was 16.2.0.
The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art
ifact with the issue.
-- Project 'app' depends onto com.google.firebase:firebase-core@+
-- Project 'app' depends onto com.google.firebase:firebase-config@+
-- Project 'app' depends onto com.google.firebase:firebase-auth@+
-- Project 'app' depends onto com.google.firebase:firebase-perf@+
-- Project 'app' depends onto com.google.android.gms:play-services-analytics@11.0.1
-- Project 'app' depends onto com.google.firebase:firebase-messaging@+
-- Project 'app' depends onto com.google.android.gms:play-services-tagmanager@+
For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep
endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https://
github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false }" to your b
uild.gradle file.
It works for debug build only.
On production it throws this error.
[13:29:25] ionic-app-script task: "build"
[13:29:25] Error: Metadata version mismatch for module
[Local address]/node_modules/@ionic-native/google-analytics/index.d.ts,
found version 4, expected 3
Error: Metadata version mismatch for module [Local address]/node_modules/@ionic-native/google-analytics/index.d.ts, found version 4, expected 3
at StaticSymbolResolver.getModuleMetadata ([Local address]\node_modules\@angular\compiler\bundles\compiler.umd.js:24474:34)
at StaticSymbolResolver._createSymbolsOf ([Local address]\node_modules\@angular\compiler\bundles\compiler.umd.js:24260:46)
at StaticSymbolResolver.getSymbolsOf ([Local address]\node_modules\@angular\compiler\bundles\compiler.umd.js:24241:14)
at [Local address]\node_modules\@angular\compiler\bundles\compiler.umd.js:23023:30
at Array.forEach (<anonymous>)
at extractProgramSymbols ([Local address]\node_modules\@angular\compiler\bundles\compiler.umd.js:23022:79)
at AotCompiler.compileAll ([Local address]\node_modules\@angular\compiler\bundles\compiler.umd.js:22720:47)
at CodeGenerator.codegen ([Local address]\node_modules\@angular\compiler-cli\src\codegen.js:30:14)
at Function.NgTools_InternalApi_NG_2.codeGen ([Local address]\node_modules\@angular\compiler-cli\src\ngtools_api.js:61:30)
at [Local address]\node_modules\@ionic\app-scripts\dist\aot\aot-compiler.js:182:73
platforms/android/app/src/main/java/org/apache/cordova/firebase/FirebasePlugin.java:9: error: cannot find symbol
import android.support.v4.app.NotificationManagerCompat;
followed by 16 more errors.
What went wrong:
Execution failed for task â:app:compileDebugJavaWithJavacâ.
Compilation failed; see the compiler error output for details.
The Build worked fine until last night. Any help or is someone also finding this issue ?
This week a new library version has been released from firebase. It seems that there is a missmatch between used libraries from google play. I faced the same and other similar errors during build process.
I used with the same version ( #GH-1057-April-05-android-build-issue) and it worked lasth month (31 May) without problems - yesterday, without any change of the plugins by myself, the build failed (Execution failed for task â:app:transformDexArchiveWithExternalLibsDexMergerForDebugâ.)
After trying several things I could build again after install additional Gradle-Plugins for define version of google-play and firebase.
Try to define which firebase library you are using with this plugin, e.g.:
Check if you have additional google plugins which depends also on google play service, e.g. cordova-plugin-googlemaps where you could define PLAY_SERVICE_VERSION as well
In my case it worked with FIREBASE_VERSION=17.+ and PLAY_SERVICES_VERSION=16.+
with the work around @newcom360, build worked fine, but the APK when installed in device it says App stopped working, Could you please help anything on this
iâm getting this error when installing the second plugin with version 15.0.1
BUILD FAILED in 5s
25 actionable tasks: 23 executed, 2 up-to-date
/Users/ulises/ulises/indoor-geolocation-plugin-ionic1/platforms/android/gradlew: Command failed with exit code 1 Error output:
Note: /Users/ulises/ulises/indoor-geolocation-plugin-ionic1/platforms/android/CordovaLib/src/org/apache/cordova/engine/SystemCookieManager.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
/Users/ulises/ulises/indoor-geolocation-plugin-ionic1/platforms/android/app/src/main/java/com/adobe/phonegap/push/PushInstanceIDListenerService.java:9: error: cannot find symbol
import com.google.firebase.iid.FirebaseInstanceIdService;
^
symbol: class FirebaseInstanceIdService
location: package com.google.firebase.iid
/Users/ulises/ulises/indoor-geolocation-plugin-ionic1/platforms/android/app/src/main/java/com/adobe/phonegap/push/PushInstanceIDListenerService.java:15: error: cannot find symbol
public class PushInstanceIDListenerService extends FirebaseInstanceIdService implements PushConstants {
^
symbol: class FirebaseInstanceIdService
/Users/ulises/ulises/indoor-geolocation-plugin-ionic1/platforms/android/app/src/main/java/com/adobe/phonegap/push/PushInstanceIDListenerService.java:18: error: method does not override or implement a method from a supertype
@Override
^
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.
3 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.