I try integrate gradle 2.0.0 plugin into my project. When i try build project by AS everything is fine. But when i try build project through console
(./gradlew build or ./gradlew assemble (before i call ./gradlew clean)) i get most popular build exception in last time
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry
Now i have last build tools.How it possible? Whats wrong?
Related
I have recently updated the version of the Firebase Appdistribution Gradle plugin from 1.4.0 to 2.0.1.
Since then Jenkins started giving the build time error below:
Execution failed for task app:appDistributionUpload[Variant]. Could not find the APK. Make sure you build first by running ./gradlew assemble[Variant], or set the api Path parameter to point to your APK
This is my Gradle script on Jenkins:
... ./gradlew cleanBuildCache :app:testDebugUnitTest :app:appDistributionUpload[Variant] ...
Starting with version 1.4.1 Running appDistributionUpload{Variant} no longer automatically rebuilds the app.
https://firebase.google.com/support/release-notes/android#appdistro_gradle_plugin_v1-4-1
Updating the Gradle script by adding :app:assemble[Variant] before :app:appDistributionUpload[Variant] solved the issue in my case. Hope it will help others as well.
I added plugin nativescript-ui-dataform to my project with command,
tns plugin add nativescript-ui-dataform
I checked package.json after install and noticed "nativescript-ui-dataform": "^3.10.0" was added to the project.
When I build project with tns build android, I get following exception,
Exception in thread "main" java.lang.ClassNotFoundException: Class:
com.telerik.widget.autocomplete.ShowSuggestionListListener
at org.nativescript.staticbindinggenerator.Generator.getClass(Generator.java:776)
at org.nativescript.staticbindinggenerator.Generator.collectInterfaceMethods(Generator.java:703)
at org.nativescript.staticbindinggenerator.Generator.getPublicApi(Generator.java:227)
at org.nativescript.staticbindinggenerator.Generator.writeBinding(Generator.java:342)
at org.nativescript.staticbindinggenerator.Generator.generateBinding(Generator.java:133)
at org.nativescript.staticbindinggenerator.Generator.processRows(Generator.java:172)
at org.nativescript.staticbindinggenerator.Generator.generateBindings(Generator.java:90)
at org.nativescript.staticbindinggenerator.Generator.writeBindings(Generator.java:66)
at org.nativescript.staticbindinggenerator.Main.main(Main.java:47)
and build failed with an error,
FAILURE: Build failed with an exception.
any suggestion on above error, why does this error occur?
It seems to be the problem with using right dependent version for nativescript-ui-autocomplete. I'm sure the versions below are compatible to each other as it's being used in the latest Playground app as of today.
npm i nativescript-ui-dataform#3.9.1 nativescript-ui-autocomplete#3.10.3 --save
Task :react-native-device-info:compileReleaseJavaWithJavac FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':react-native-device-info:compileReleaseJavaWithJavac'.
java.io.FileNotFoundException: /workspace/eos-native/node_modules/react-native-device-info/android/build/intermediates/annotation_processor_list/release/annotationProcessors.json (No such file or directory)
The error makes sense , and the file is not there, but I have no idea why its not there? It is created when I run a debug version of the app and debug versions of my libraries, react-native-device-info, react-orientation-locker etc.. I've cleaned, gradle synched, rebuilt etc. but when trying to assemble or install a release build I get this error within seconds. What is causing the Java
I had the same problem in an android project (without react) when I added a library module.
After searching for a solution for quite some time, I finally deleted the .gradle directory in the project root folder.
This solved the problem for me.
update android gradle plugin to 3.3
update gradle to 4.10.3
fixed the issue for me.
I'm having this error when integrating Adobe Creative SDK. The problem seems to come from Localytics library inside the Creative SDK.
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/localytics/android/BuildConfig.class
This seems to happen because we are also using Localytics in our project but I found out that the one in the Creative SDK is older version (Ver. 2) than the one in our project (Ver. 4)
You can use this command at the Android Studio Terminal:
1
./gradlew :app:dependencies
2
./gradlew clean (Android ---> Clean the Project)
3
./gradlew clean assembleDebug | ./gradlew clean:assembleDebug
Let me know if this works! I fixed my project or if you need something more clear.
Am using the following library Autobahn for web sockets usage in my Android project.
When am using the old gradle version 1.3.0, am not encountering any issues in building & running the app, whereas
when i update the gradle version to 1.5.0, am encountering the following issue.
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: de/tavendo/autobahn/ByteBufferInputStream.class
I have tried the below options already
1. multiDexEnabled is set to true in gradle file.
2. gradlew clean is also done, along with clean build.
Any other suggestions to resolve this issue would be great.
Regards,
Dinesh Kumar G
Here is a interesting way to add Autoban build to gradle. Try to remove your jar and add this in your build file.