How can i pass Ionic MultiDex Error when android build? - ionic-framework

I added LottieSplashScreen to my Project but i can't build. This error
Execution failed for task ':app:transformClassesWithMultidexlistForRelease'.
> com.android.build.api.transform.TransformException: Error while generating the main dex list.

Related

Execution failed for task ':app:transformClassesAndResourcesWithR8ForRelease'

com.android.tools.r8.CompilationFailedException: Compilation failed to complete
How to resolve this issue ? This error occurs when I was creating android build.
I've tried to create android build but I wasn't succeeded.

> Android resource linking failed ERROR:: AAPT: error: failed to open APK: Invalid file

i am trying to run my new flutter project in visual studio code, but i am getting this kind of problem in my debug console, is there any way to solve it?
I am getting this while trying to run build in debug mode
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
> Android resource linking failed
ERROR:: AAPT: error: failed to open APK: Invalid file.

VScode BUILD FAILED Exception: Gradle task assembleDebug failed with exit code 1

I am trying to code an app for the first time with flutter in vs code and I am getting this error,
FAILURE: Build failed with an exception.
Where:
Build file 'C:\Users\ajgoc\Desktop\Badges\badges_gram\buddies_gram-master\android\build.gradle' line: 29
What went wrong:
A problem occurred evaluating root project 'android'.
A problem occurred configuring project ':app'.
Failed to notify project evaluation listener.
> 'org.gradle.api.file.DirectoryProperty org.gradle.api.file.ProjectLayout.directoryProperty(org.gradle.api.provider.Provider)'
Exception: Gradle task assembly debug failed with exit code 1
I have tried a couple of things to fix it but haven't gotten anything to work. The app will still load in the emulator but it is an older version of the app. Here is what my gradle-wrapper.poperties and build.gradle files look like.
gradle-wrapper.poperties
build.gradle
flutter doctor -v output

I am trying to build apk of my Flutter project but an error occurs and it fails to build

Microsoft Windows [Version 10.0.18363.778]
(c) 2019 Microsoft Corporation. All rights reserved.
F:\flutter_projects\i_am_rich>flutter build apk
You are building a fat APK that includes binaries for android-arm, android-arm64, android-x64.
If you are deploying the app to the Play Store, it's recommended to use app bundles or split the APK to reduce the APK
size.
To generate an app bundle, run:
flutter build appbundle --target-platform android-arm,android-arm64,android-x64
Learn more on: https://developer.android.com/guide/app-bundle
To split the APKs per ABI, run:
flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi
Learn more on: https://developer.android.com/studio/build/configure-apk-splits#configure-abi-split
Running Gradle task 'assembleRelease'...
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:mergeReleaseResources'.
Multiple task action failures occurred:
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
Android resource compilation failed
F:\flutter_projects\i_am_rich\android\app\src\main\res\mipmap-xhdpi\ic_launcher.png: AAPT: error: failed to read PNG signature: file does not start with PNG signature.
F:\flutter_projects\i_am_rich\android\app\src\main\res\mipmap-xhdpi\ic_launcher.png: AAPT: error: file failed to compile.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
Android resource compilation failed
F:\flutter_projects\i_am_rich\android\app\src\main\res\mipmap-mdpi\ic_launcher.png: AAPT: error: failed to read PNG signature: file does not start with PNG signature.
F:\flutter_projects\i_am_rich\android\app\src\main\res\mipmap-mdpi\ic_launcher.png: AAPT: error: file failed to compile.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
Android resource compilation failed
F:\flutter_projects\i_am_rich\android\app\src\main\res\mipmap-xxxhdpi\ic_launcher.png: AAPT: error: failed to read PNG signature: file does not start with PNG signature.
F:\flutter_projects\i_am_rich\android\app\src\main\res\mipmap-xxxhdpi\ic_launcher.png: AAPT: error: file failed to compile.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
Android resource compilation failed
F:\flutter_projects\i_am_rich\android\app\src\main\res\mipmap-xxhdpi\ic_launcher.png: AAPT: error: failed to read PNG signature: file does not start with PNG signature.
F:\flutter_projects\i_am_rich\android\app\src\main\res\mipmap-xxhdpi\ic_launcher.png: AAPT: error: file failed to compile.
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 2m 29s
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done 152.6s (!)
Gradle task assembleRelease failed with exit code 1
F:\flutter_projects\i_am_rich>
I think you messed up with the icon files of your app. Try to replace the icon files.
If you use the https://appicon.co/ website to create the application icon, you must choose an image of png

How do I update android studio's gradle?

This is what I'm receiving from Android Studio, but I don't know how to fix this in the latest version.
A problem occurred evaluating project ':app'.
> Failed to apply plugin [id 'com.android.internal.version-check']
> Minimum supported Gradle version is 5.6.4.
Edit: I changed the gradle-wrapper.properties to
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
And now also went to File/Settings/Build, Execution, Deployment/Gradle, and changed the Gradle User Home to a gradle-5.6.4 that I downloaded.
But now, I'm receiving this:
Finished with error: Gradle task assembleDebug failed with exit code 1