这个问题已经在这里有了答案: > Gradle build tool cannot find play-services-tasks.aar? Why? 8个
帮助我解决gradle中的那些错误.
错误:
Warning:Configuration ‘androIDTestCompile’ is obsolete and has
been replaced with ‘androIDTestImplementation’ and ‘androIDTestAPI’.
It will be removed at the end of 2018. For more information see:
07001Warning:Configuration ‘compile’ is obsolete and has been replaced with
‘implementation’ and ‘API’. It will be removed at the end of 2018. For
more information see:
07001Warning:Configuration ‘androIDTestAPI’ is obsolete and has been
replaced with ‘androIDTestImplementation’. It will be removed at the
end of 2018. For more information see:
07001Warning:Configuration ‘testCompile’ is obsolete and has been replaced
with ‘testImplementation’ and ‘testAPI’. It will be removed at the end
of 2018. For more information see:
07001Warning:Configuration ‘testAPI’ is obsolete and has been replaced with
‘testImplementation’. It will be removed at the end of 2018. For more
information see:
07001Error:Failed to resolve: firebase-analytics Open
fileError:Failed to resolve: play-services-base Open
file
在我的gradle中发现了那些错误和警告.
这些错误是最近出现的,以前没有问题.
这是我的应用程式:
'apply plugin: 'com.androID.application' androID { compileSdkVersion 27 buildToolsversion '27.0.3' defaultConfig { applicationID "com.example.alagappan.vivo" minSdkVersion 21 targetSdkVersion 27 versionCode 1 versionname "1.0" multIDexEnabled true testInstrumentationRunner "androID.support.test.runner.AndroIDJUnitRunner" } buildTypes { release { MinifyEnabled false proguardfiles getDefaultProguardfile('proguard-androID.txt'), 'proguard-rules.pro' } } compileOptions { targetCompatibility 1.8 sourceCompatibility 1.8 } } buildscript { repositorIEs { jcenter() } dependencIEs { classpath 'com.jakewharton:butterknife-gradle-plugin:8.5.1' } }dependencIEs { androIDTestCompile('com.androID.support.test.espresso:espresso- core:2.2.2', { exclude group: 'com.androID.support', module: 'support-annotations' }) compile 'com.androID.support:appcompat-v7:27.1.1' compile filetree(include: ['*.jar'], dir: 'libs') compile 'com.androID.support.constraint:constraint-layout:1.1.0' compile 'com.androID.support:recyclervIEw-v7:27.1.1' compile 'com.androID.support:cardvIEw-v7:27.1.1' compile 'com.Google.firebase:firebase-core:15.0.0' compile 'com.Google.firebase:firebase-database:16.0.1' compile 'com.Google.firebase:firebase-auth:16.0.1' testCompile 'junit:junit:4.12' compile 'com.Google.androID.gms:play-services-auth:15.0.1' compile 'com.firebaseui:firebase-ui-database:3.2.2' compile 'com.androID.support:design:27.1.1' compile 'com.firebase:firebase-clIEnt-androID:2.5.0' compile 'com.andkulikov:Transitionseverywhere:1.7.9' }' apply plugin: 'com.Google.gms.Google-services'
这是应用程序侧gradle:-
'// top-level build file where you can add configuration options common to all sub-projects/modules.buildscript { repositorIEs { jcenter() Google() } dependencIEs { classpath 'com.androID.tools.build:gradle:3.1.2' // NOTE: Do not place your application dependencIEs here; they belong // in the indivIDual module build.gradle files }}buildscript { dependencIEs { classpath 'com.Google.gms:Google-services:3.2.0' // Google-services plugin }}allprojects { repositorIEs { jcenter() Google() } }task clean(type: Delete) { delete rootProject.buildDir}'
在此先感谢您的朋友
解决方法:
去掉:
compile 'com.firebase:firebase-clIEnt-androID:2.5.0'
因为它已被弃用.
https://www.firebase.com/docs/android/quickstart.html
将顶级gradle文件更改为此:
buildscript {repositorIEs { Google() jcenter()}dependencIEs { classpath 'com.androID.tools.build:gradle:3.1.0' classpath 'com.Google.gms:Google-services:3.3.0' }}allprojects { repositorIEs { Google() jcenter() } }task clean(type: Delete) { delete rootProject.buildDir}
https://developer.android.com/studio/releases/gradle-plugin
更改:
>编译执行
> androIDTestCompile和androIDTestAPI到androIDTestImplementation
> testCompile和testAPI到testImplementation
https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration
总结以上是内存溢出为你收集整理的android-无法解决:firebase-analytics无法解决:play-service-base全部内容,希望文章能够帮你解决android-无法解决:firebase-analytics无法解决:play-service-base所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)