App crashes suddenly: RuntimeException - android

My app worked perfectly but suddenly yesterday I received this error:
Error:Execution failed for task :app:transformDexArchiveWithExternalLibsDexMergerForDebug
java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
Iv'e tried some sulotions like clean and rebuild project and setting multiDexEnabled to true but none of them worked. Another sulotion?

Related

Error when I add webview_flutter : Execution failed for task ':app:transformClassesWithMultidexlistForDebug'

I am getting the following Error When I run the flutter project only after installed webview_flutter plugin.
Execution failed for task ':app:transformClassesWithMultidexlistForDebug'
> com.android.build.api.transform.TransformException: Error while generating the main dex list.
I am already using firebase in the app. some searches saying this is the problem related to the firebase. Searches are giving following solutions. I have tried all of them. but still getting the same.
Migrating to Android X, Making multiDexEnabled true in android build.gradle,

Why does it give Unable to merge dex for play-services-safetynet?

I added this in the build.gradle file: implementation 'com.google.android.gms:play-services-safetynet:12.0.1'
Then it shows this error: Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
I'm using f_grecaptcha and followed the documentation but still got this error.
Is there any way to fix this?

Error:Execution failed for task .DexArchiveMergerException: Unable to merge dex

I am getting error Unable to merge dex
that’s my gradle
I have already done following
clean and rebuild
Invalidate and restart
multiDexEnabled true
implementation ‘com.android.support:multidex:1.0.1’
Delete .gradle folder and restart android studio
Still problem is not resolved I am stuck from 2 days please help
Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
Android has recently updates their libraries into 27.1.0,So simply change your dependencies.
Also add this in app/build.gradle:
android {
defaultConfig {
multiDexEnabled true
}
}

Android jitpack needs clean build on each release

I am building a view that has a vertical trail on git hub and added it on jitpack, but every time i do a release an download the package using gradle I have to do a clean Re-build().
Error:
Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
Is it related to gitignore?
Repo: https://github.com/Mohammad-Tabbara/TrailedSheet
Note: i just changed .gitignore.
My problem has been solved it was related to .gitignore used:
https://github.com/github/gitignore/blob/master/Android.gitignore
And everything now is fine.
Would love to know the cause if any body would like to share.
Seams working so far.

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':mergeDevOnlySlDebugResources' only on Jenkins

When I use Android Studio 3.0 Beta 7 and update my project with the Android Gradle 3.0.0-beta7 plugin my project builds fine in both the debug and rc (proguard enabled) variants.
When I attempt to build on my Jenkins box, I get a bunch of:
C:\Windows\System32\config\systemprofile\.gradle\caches\transforms-1\files-1.1\androidsdk-2.4.12-fullRelease.aar\222313e24d6c4b00972b4191a95e6e2e\res\drawable-xxhdpi-v4\ic_teads_sdk_contact_us.png: error: file not found.
C:\Windows\System32\config\systemprofile\.gradle\caches\transforms-1\files-1.1\appcompat-v7-25.3.1.aar\c8fedf0a28e83c9ac57e1ac18693c6a0\res\drawable-hdpi-v4\abc_tab_indicator_mtrl_alpha.9.png: error: file not found.
C:\Windows\System32\config\systemprofile\.gradle\caches\transforms-1\files-1.1\android-sdk-ui-2.0.4.aar\0b51ce1d665e491601444168a26000ca\res\drawable-xhdpi-v4\com_appboy_inappmessage_chevron.png: error: file not found.
What went wrong:
Execution failed for task ':mergeDevOnlySlDebugResources'.
Error: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
I tried to use AAPT instead of AAPT2 and that still gives me the same problem. My other jenkins projects that are not running this gradle 3 change still run fine. Also the files that can't be found from above are indeed on my machine in the location that AAPT can't find.
Has anyone run into this before?
I've seen error's online about invalid PNG or actual errors from using the new AAPT2, but this is different.
I solved this problem by adding the below line to the gradle.properties file:
android.enableAapt2=false

Categories

Resources