The library com.google.android.gms:play-services-measurement-base is being requested by various other libraries at [[15.0.0,

此生再无相见时 提交于 2020-06-12 07:45:12

问题


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.

  1. npm i cordova-android-firebase-gradle-release
  2. npm i cordova-android-support-gradle-release
  3. 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": "+"
      }

  1. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!