Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle error: Unexpected inputs: android.gms:play-services

In RunTime show error in Gradle the error:

Error:Execution failed for task ':app:transformClassesWithInstantRunForDebug'.

Unexpected inputs: 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.jar, 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 project-level:

dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1'
        classpath 'com.google.gms:google-services:3.1.0'

    }

gradle app-level:

dependencies {
...
}
apply plugin: 'com.google.gms.google-services'
like image 232
Nawaf Abdu Avatar asked Dec 14 '17 13:12

Nawaf Abdu


3 Answers

It seems you have enable Instant Run in Android Studio.

1) Disable Instant Run from File -> Settings -> Instant Run
2) Clean Your Project
3) Run Your App

like image 99
Jaymin Soni Avatar answered Oct 13 '22 03:10

Jaymin Soni


Personally, Build => Clean Project and then rebuilding fixed it for me.

like image 20
Karuhanga Avatar answered Oct 13 '22 03:10

Karuhanga


Remove Build Folder from Project->app->build and run your project.

like image 30
Saljith Kj Avatar answered Oct 13 '22 03:10

Saljith Kj