Naw*_*bdu 20 android google-play-services android-gradle-plugin
在Gradle中运行时显示错误错误:
错误:任务':app:transformClassesWithInstantRunForDebug'的执行失败.
意外输入:ImmutableJarInput {name = com.google.android.gms:play-services-basement:9.0.0,file =/home/nawaf/AndroidStudioProjects/YugiohDeckBuilder/app/build/intermediates/transforms/profilers-transform/debug/43.jar,contentTypes = CLASSES,scopes = EXTERNAL_LIBRARIES,status = REMOVED},ImmutableJarInput {name = com.google.firebase:firebase-analytics:9.0.0,file =/home/nawaf/AndroidStudioProjects/YugiohDeckBuilder/app/build/intermediates/transforms/profilers-transform/debug/37.jar,contentTypes = CLASSES,scopes = EXTERNAL_LIBRARIES,status = REMOVED},ImmutableJarInput {name = com.google.android.gms:play-services-base:9.0.0,file =/home/nawaf/AndroidStudioProjects/YugiohDeckBuilder/app/build/intermediates/transforms/profilers-transform/debug/39.jar,contentTypes = CLASSES,scopes = EXTERNAL_LIBRARIES,status = REMOVED},ImmutableJarInput {name = com.google.firebase :firebase-common:9.0.0,file =/home/nawaf/AndroidStudioProjects/YugiohDeckBuilder/app/build/intermediates/transforms/profilers-transform/debug/41.j ar,contentTypes = CLASSES,scopes = EXTERNAL_LIBRARIES,status = REMOVED},ImmutableJarInput {name = com.google.firebase:firebase-core:9.0.0,file =/home/nawaf/AndroidStudioProjects/YugiohDeckBuilder/app/build/intermediates/transforms/profilers-transform/debug/36.jar,contentTypes = CLASSES,scopes = EXTERNAL_LIBRARIES,status = REMOVED},ImmutableJarInput {name = com.google.android.gms:play-services-tasks:9.0.0,file =/home/nawaf/AndroidStudioProjects/YugiohDeckBuilder/app/build/intermediates/transforms/profilers-transform/debug/42.jar,contentTypes = CLASSES,scopes = EXTERNAL_LIBRARIES,status = REMOVED},ImmutableJarInput {name = com.google.firebase:firebase -analytics-impl:9.0.0,file =/home/nawaf/AndroidStudioProjects/YugiohDeckBuilder/app/build/intermediates/transforms/profilers-transform/debug/38.jar,contentTypes = CLASSES,scopes = EXTERNAL_LIBRARIES,status = REMOVED} ,ImmutableJarInput {name = com.google.firebase:firebase-iid:9.0.0,file =/home/nawaf/AndroidStudioProjects/YugiohDeckBuilder/app/build/intermediates /transforms/profilers-transform/debug/40.jar,contentTypes = CLASSES,scopes = EXTERNAL_LIBRARIES,status = REMOVED}
Gradle项目级别:
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.google.gms:google-services:3.1.0'
}
Run Code Online (Sandbox Code Playgroud)
gradle app-level:
dependencies {
...
}
apply plugin: 'com.google.gms.google-services'
Run Code Online (Sandbox Code Playgroud)
小智 46
您似乎已在Android Studio中启用了Instant Run.
1)禁用从文件即时运行 - >设置 - >即时运行
2)清理您的项目
3)运行您的应用程序
Naw*_*bdu -3
当我添加这一行时,问题解决了:
MobileAds.initialize(getApplicationContext(), "ca-app-pub-xxxxxxxxxxxxx");
Run Code Online (Sandbox Code Playgroud)
感谢所有回复的人。
| 归档时间: |
|
| 查看次数: |
10519 次 |
| 最近记录: |