问题
The library com.google.android.gms:play-services-measurement-base
is being requested by various other libraries at [[15.0.0,15.0.0], [16.0.0,16.0.0]], but resolves to 16.0.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
build error android every time I build this I got same problem for project
回答1:
For those who still have this problem on the Ionic framework. After 2 day's of trying, I succeeded to build my project.
npm i cordova-android-firebase-gradle-release
npm i cordova-android-support-gradle-release
- In package.json under plugins, you should have this:
"cordova-android-play-services-gradle-release": {
"PLAY_SERVICES_VERSION": "+"
},
"cordova-android-firebase-gradle-release": {
"FIREBASE_VERSION": "+"
}
- In config.xml, you should have these:
<plugin name="cordova-android-play-services-gradle-release" spec="^2.0.0">
<variable name="PLAY_SERVICES_VERSION" value="+" />
</plugin>
<plugin name="cordova-android-firebase-gradle-release" spec="^2.0.0">
<variable name="FIREBASE_VERSION" value="+" />
</plugin>
That's it. Hope it helps :)
回答2:
Remove com.google.android.gms:play-services:15.0.1
from Gradle and use only individual which you have required.
check here.
Note: Don't use the combined play-services target. It brings in dozens of libraries, bloating your application. Instead, specify only the specific Google Play services APIs your app uses.
来源:https://stackoverflow.com/questions/51682721/the-library-com-google-android-gmsplay-services-measurement-base-is-being-reque