Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error:Execution failed for task ':app:packageDebug'. > !zip.isFile()

Tags:

@UPDATE

Thank you very much. Now at least there are no errors. But it's still a far cry from how it worked before - how it should work. Now, the database looks ... strange. I think that something is still wrong with this gradle.

enter image description here

It should not look like. According to the java code in the database will be user and its data (name, email, date of account creation, id avatar) enter image description here

In the application at the site next to the avatar you should display the name. Unfortunately, as you can see nothing happens. There is nothing wrong with the code because it previously worked. :(


I ruined my project! I tried to fix it but now it's worse than it was.

The project is chat client through Firebase.

It started when I deleted my base. I had too many test users, messages I wanted to clear it. Since then, it gets a million error notifications - trying to fix one thing leads to even worse errors.

I tried to connect to the application completely different base, I tried to re-arrange a few things. Nothing helps.

At first I thought that the problem is with wrong compile 'com.google.firebase:firebase-database:9.8.0' number. Then I received

E/FirebaseApp: Firebase API initialization failure.

I try to fix it. Application was started and in the database was very strange things.

Now i get

Error:Execution failed for task ':app:packageDebug'.> !zip.isFile()

build.gradle (project)

buildscript {     repositories {         jcenter()     }     dependencies {         classpath 'com.android.tools.build:gradle:2.2.3'         classpath 'com.google.gms:google-services:3.0.0'      } } 

build.gradle (module:app)

apply plugin: 'com.android.application' apply plugin: 'com.google.gms.google-services'  android {     compileSdkVersion 25     buildToolsVersion "25.0.2"     defaultConfig {         applicationId "com.example.rachel.komunikator"         minSdkVersion 15         targetSdkVersion 25         versionCode 1         versionName "1.0"         testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"     }     buildTypes {         release {             minifyEnabled false             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'         }     } }  dependencies {     compile fileTree(dir: 'libs', include: ['*.jar'])     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:25.1.0'     compile 'com.google.firebase:firebase-database:9.8.0'      compile 'com.google.firebase:firebase-auth:9.8.0'     compile 'com.android.support:recyclerview-v7:25.1.0'     testCompile 'junit:junit:4.12' } 

Google Play Services on my emulator

version of Google Play Services on emulator

Im using: Android Studio 2.2.3 and Nexus 5X Emulator

@UPDATE

W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found. E/FirebaseApp: Firebase API

initialization failure. D/FirebaseApp:

com.google.firebase.crash.FirebaseCrash is not linked. Skipping initialization.

all logs:

W/System: ClassLoader referenced unknown path: /data/app/com.example.rachel.komunikator-2/lib/x86            [ 02-02 20:56:04.988  1566: 1589 D/         ]           HostConnection::get() New Host Connection established 0x8cf20100, tid 1589 I/InstantRun: Instant Run Runtime started. Android package is com.example.rachel.komunikator, real application class is null. W/System: ClassLoader referenced unknown path: /data/app/com.example.rachel.komunikator-2/lib/x86 W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found. W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found. W/System: ClassLoader referenced unknown path: /system/priv-app/PrebuiltGmsCore/lib/x86 E/FirebaseApp: Firebase API initialization failure.                java.lang.reflect.InvocationTargetException                    at java.lang.reflect.Method.invoke(Native Method)                    at com.google.firebase.FirebaseApp.zza(Unknown Source)                    at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)                    at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)                    at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)                    at com.google.firebase.provider.FirebaseInitProvider.onCreate(Unknown Source)                    at android.content.ContentProvider.attachInfo(ContentProvider.java:1751)                    at android.content.ContentProvider.attachInfo(ContentProvider.java:1726)                    at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source)                    at android.app.ActivityThread.installProvider(ActivityThread.java:5853)                    at android.app.ActivityThread.installContentProviders(ActivityThread.java:5445)                    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5384)                    at android.app.ActivityThread.-wrap2(ActivityThread.java)                    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1545)                    at android.os.Handler.dispatchMessage(Handler.java:102)                    at android.os.Looper.loop(Looper.java:154)                    at android.app.ActivityThread.main(ActivityThread.java:6119)                    at java.lang.reflect.Method.invoke(Native Method)                    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)                    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)                 Caused by: java.lang.IllegalAccessError: Method 'void android.support.v4.content.ContextCompat.<init>()' is inaccessible to class 'com.google.firebase.iid.zzg' (declaration of 'com.google.firebase.iid.zzg' appears in /data/data/com.example.rachel.komunikator/files/instant-run/dex/slice-com.google.firebase-firebase-iid-9.0.0_8eee9db5e99a0da2dcdc7b52647c81db3aed29e6-classes.dex)                    at com.google.firebase.iid.zzg.zzeC(Unknown Source)                    at com.google.firebase.iid.zzg.<init>(Unknown Source)                    at com.google.firebase.iid.zzg.<init>(Unknown Source)                    at com.google.firebase.iid.zzd.zzb(Unknown Source)                    at com.google.firebase.iid.FirebaseInstanceId.getInstance(Unknown Source)                    at java.lang.reflect.Method.invoke(Native Method)                     at com.google.firebase.FirebaseApp.zza(Unknown Source)                     at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)                     at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)                     at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)                     at com.google.firebase.provider.FirebaseInitProvider.onCreate(Unknown Source)                     at android.content.ContentProvider.attachInfo(ContentProvider.java:1751)                     at android.content.ContentProvider.attachInfo(ContentProvider.java:1726)                     at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source)                     at android.app.ActivityThread.installProvider(ActivityThread.java:5853)                     at android.app.ActivityThread.installContentProviders(ActivityThread.java:5445)                     at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5384)                     at android.app.ActivityThread.-wrap2(ActivityThread.java)                     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1545)                     at android.os.Handler.dispatchMessage(Handler.java:102)                     at android.os.Looper.loop(Looper.java:154)                     at android.app.ActivityThread.main(ActivityThread.java:6119)                     at java.lang.reflect.Method.invoke(Native Method)                     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)  D/FirebaseApp: com.google.firebase.crash.FirebaseCrash is not linked. Skipping initialization. E/FirebaseApp: Firebase API initialization failure.                java.lang.reflect.InvocationTargetException                    at java.lang.reflect.Method.invoke(Native Method)                    at com.google.firebase.FirebaseApp.zza(Unknown Source)                    at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)                    at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)                    at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)                    at com.google.firebase.provider.FirebaseInitProvider.onCreate(Unknown Source)                    at android.content.ContentProvider.attachInfo(ContentProvider.java:1751)                    at android.content.ContentProvider.attachInfo(ContentProvider.java:1726)                    at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source)                    at android.app.ActivityThread.installProvider(ActivityThread.java:5853)                    at android.app.ActivityThread.installContentProviders(ActivityThread.java:5445)                    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5384)                    at android.app.ActivityThread.-wrap2(ActivityThread.java)                    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1545)                    at android.os.Handler.dispatchMessage(Handler.java:102)                    at android.os.Looper.loop(Looper.java:154)                    at android.app.ActivityThread.main(ActivityThread.java:6119)                    at java.lang.reflect.Method.invoke(Native Method)                    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)                    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)                 Caused by: java.lang.NoSuchMethodError: No static method zzz(Ljava/lang/Object;)Ljava/lang/Object; in class Lcom/google/android/gms/common/internal/zzaa; or its super classes (declaration of 'com.google.android.gms.common.internal.zzaa' appears in /data/data/com.example.rachel.komunikator/files/instant-run/dex/slice-com.google.android.gms-play-services-basement-9.8.0_b60271da061b8a83af31355011409573bfa72cef-classes.dex)                    at com.google.android.gms.measurement.internal.zzx.zzbd(Unknown Source)                    at com.google.android.gms.measurement.AppMeasurement.getInstance(Unknown Source)                    at java.lang.reflect.Method.invoke(Native Method)                     at com.google.firebase.FirebaseApp.zza(Unknown Source)                     at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)                     at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)                     at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)                     at com.google.firebase.provider.FirebaseInitProvider.onCreate(Unknown Source)                     at android.content.ContentProvider.attachInfo(ContentProvider.java:1751)                     at android.content.ContentProvider.attachInfo(ContentProvider.java:1726)                     at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source)                     at android.app.ActivityThread.installProvider(ActivityThread.java:5853)                     at android.app.ActivityThread.installContentProviders(ActivityThread.java:5445)                     at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5384)                     at android.app.ActivityThread.-wrap2(ActivityThread.java)                     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1545)                     at android.os.Handler.dispatchMessage(Handler.java:102)                     at android.os.Looper.loop(Looper.java:154)                     at android.app.ActivityThread.main(ActivityThread.java:6119)                     at java.lang.reflect.Method.invoke(Native Method)                     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)  
like image 529
Kainka Avatar asked Feb 02 '17 19:02

Kainka


1 Answers

Clean and Rebuild project should work. It work for me. Look at this: https://code.google.com/p/android/issues/detail?id=230211

like image 194
K.Sopheak Avatar answered Sep 19 '22 14:09

K.Sopheak