Android Execution failed for task ':app:packageDebug' - android

I need to load html file in webview, but this html contains a lot of scripts and other resourses. So i put my index.html and two folders with resourses to my assets folder. Now when i'm trying to build my project i got this error:
:app:packageDebug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:packageDebug'.
> Failed to add E:\Projects\PressurIce\app\build\intermediates\resources\resources-debug.ap_
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
The first question is: anybody know what does it mean ?
The second question is: how can i do this thing:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
to see more logs ? Thx.
UPDATE 1
Run with --stacktrace give more info:
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:packageDebug'.
Caused by: com.android.builder.packaging.PackagerException: Failed to add E:\Projects\PressurIce\app\build\intermediates\resources\resources-debug.ap_
at com.android.builder.internal.packaging.Packager.addZipFile(Packager.java:422)
at com.android.builder.internal.packaging.Packager.<init>(Packager.java:307)
at com.android.builder.core.AndroidBuilder.packageApk(AndroidBuilder.java:1474)
at com.android.builder.core.AndroidBuilder$packageApk$4.call(Unknown Source)
at com.android.build.gradle.tasks.PackageApplication.doFullTaskAction(PackageApplication.groovy:97)
... 63 more
Caused by: java.util.zip.ZipException: invalid code lengths set
at com.android.builder.signing.SignedJarBuilder.writeEntry(SignedJarBuilder.java:343)
at com.android.builder.signing.SignedJarBuilder.writeZip(SignedJarBuilder.java:274)
at com.android.builder.internal.packaging.Packager.addZipFile(Packager.java:416)
... 67 more

Related

After changing my flutter android icons this happened

FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:processDebugResources'.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
Android resource linking failed
C:\Users\pc\AndroidStudioProjects\flutter_dummy\build\app\intermediates\packaged_manifests\debug\AndroidManifest.xml:16: AAPT: error: resource mipmap/ic_launcher (aka com.example.flutter_dummy:mipmap/ic_launcher) not found.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 9s
Exception: Gradle task assembleDebug failed with exit code 1
#Viraj D is right as you need to post it in amore ellaborate and short manner,
probable sln: check your manifest ,in the android/app directory and confirm that the mipmap/ic_launcher is referenced well, or if it actually exists

how can i solve flutter path provider debug error

`FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':path_provider:parseDebugLibraryResources'.
Could not resolve all files for configuration ':path_provider:androidApis'.
Failed to transform file 'android.jar' to match attributes {artifactType=android-platform-attr, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}
> Execution failed for PlatformAttrTransform: C:\Users\g\AppData\Local\Android\sdk\platforms\android-28\android.jar.
> C:\Users\g\AppData\Local\Android\sdk\platforms\android-28\android.jar (The system cannot find the file specified)
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 1m 38s
Exception: Gradle task assembleDebug failed with exit code 1`
how can i solve flutter debug error "path_provider parse Debug Library Resources". i upgraded everything and included the "path_provider" dependency. tell me how i can solve this problem.

Not build App for Nativescript with Android

I have a problem with build nativescript for android app. I could build the app, and pne day, the other the build crashed. I ran 'tns run android --bundle' and the log error it's:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformClassesWithMultidexlistForDebug'.
> com.android.build.api.transform.TransformException: Error while generating the main dex list:
Error while merging dex archives:
Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
Program type already present: com.google.zxing.ChecksumException
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 27s
Any idea?

Ionic Build Android

I am trying to build an APK for android, and it keeps giving me the following error. I tried everything out there online and never worked. Please help.
BUILD FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ‘:transformClassesWithJarMergingForDebug’.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: org/apache/cordova/PermissionHelper.class
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Total time: 1 mins 51.939 secs
Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ‘:transformClassesWithJarMergingForDebug’.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: org/apache/cordova/PermissionHelper.class
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
[ERROR] An error occurred while running cordova build android (exit code 1).

ERROR: Execution failed for task ':app:mergeDebugResources'

I've been having this problem since yesterday and I have absolutely no idea how it happened. I've visited StackOverflow multiple times yet nothing seems to be helping.
Here's the error.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> Some file crunching failed, see logs for details
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option
to get more log output.
BUILD FAILED
This error made all my 'R' turn to red.

Categories

Resources