How to resolve java.util.zip.ZipException?
Edit: This is a bug and a fix is due. See https://code.google.com/p/android/issues/detail?id=81804
I have this problem too, and I don't have an answer. But here's what I can add:
The class BuildConfig
is a magic class generated as part of the build process. For some reason, there exists a version with the same fully-qualified name (android.support.multidex.BuildConfig
) in both mutildex-1.0.0
and multidex-instrumentation-1.0.0
aars.
I don't believe we have done anything wrong. I think this is a symptom of being on the cutting-edge. I raised a bug report.
How to correct the error 'java.util.zip.ZipException: error in opening zip file' invoking web service on WAS with Portal
The suggestions about the open file limit restrictions were right all along, we were just looking in the wrong place. The 'default' ulimit settings were valid, but these are not the ones that are applied when the WebSphere Portal server is started via an init.d script. The very last section in this article identified the issue we were experiencing:
http://www-01.ibm.com/support/docview.wss?uid=swg21469413
We verified this was the case by using the details in this article:
http://www-01.ibm.com/support/docview.wss?rs=0&uid=swg21407889
All that was required was the update the init.d script to include the line 'ulimit -n xxxxx' with our required limit. We had used the WASService scripts to generate the init.d script and thought that it shouldn't need further modification. Maybe we missed a point in the use of the WASService script that handles this.
java.util.zip.ZipException: error in opening zip file when trying to create a new JarFile
If you check the JavaDoc for the JarFile
type, you'll see that it's only used for reading existing .jar
files.
The JarFile class is used to read the contents of a jar file from any
file that can be opened with java.io.RandomAccessFile. - https://docs.oracle.com/javase/9/docs/api/java/util/jar/JarFile.html
To create a .jar
file, you'll need to use a java.util.jar.JarOutputStream
.
Exception in thread main java.util.zip.ZipException: error in opening zip file
your gradle-3.5.1-all file is corrupted delete it from
C:\Users\Sanam Gurung.gradle\.gradle\wrapper\dists
and then just run
react-native run-android
How to solve java.util.zip.ZipException duplicate entry: com/google/gson/annotations/Expose.class?
You should exclude module: 'gson'
from twitter dependency
like
compile('com.twitter.sdk.android:twitter:1.10.0@aar') {
transitive = true;
exclude module: 'gson'
}
You already added GSON as gson-2.3.1.jar
Related Topics
Android Studio - Creating Modules Without Copying Files
How to Get Multiple Icons to Launch Different Activities in One Application
How to Remove All Listeners Added with Addtextchangedlistener
How to Fix: "You Need to Use a Theme.Appcompat Theme (Or Descendant) with This Activity"
File Res/Drawable/Abc_Ic_Ab_Back_Material.Xml from Drawable Resource Id #0X7F020016
Receive Push Notifications on One Android App from Two Firebase Projects
Fragments Destroyed/Recreated with Jetpack's Android Navigation Components
How to Detect System Information Like Os or Device Type
How to Dynamically Create Menu Items
List All the Files from All the Folder in a Single List
Android: Tabhost Without Tabactivity
Load an Image from Assets Folder
Android Resources$Notfoundexception: Resource Id #0X7F030027
How to Create a .CSV on Android
How to Hide Underbar in Edittext
What Do Gc_For_Malloc, Gc_Explicit, and Other Gc_* Mean in Android Logcat