flutter build apk --split-per-abi errors - flutter

I want help configuring the apk file I see this message
code flutter build apk --split-per-abi
Is there anyone to help me with this problem and thank you in advance
PS C:\Users\deuts\OneDrive\Bureau\vox\NewsPro v2.1.0\newspro\news_pro> flutter build apk --split-per-abi
Building with sound null safety
error: error reading C:\Users\deuts\.gradle\caches\modules-2\files-2.1\androidx.lifecycle\lifecycle-common-java8\2.4.0-beta01\5b8f86fea035328fc9e8c660773037a3401ce25f\lifecycle-common-java8-2.4.0-beta01.jar; zip END header not found
error: error reading C:\Users\deuts\.gradle\caches\modules-2\files-2.1\androidx.lifecycle\lifecycle-common\2.4.0-beta01\1fdb7349701e9cf2f0a69fc10642b6fef6bb3e12\lifecycle-common-2.4.0-beta01.jar; zip END header not found
C:\Users\deuts\OneDrive\Bureau\vox\NewsPro v2.1.0\newspro\news_pro\build\better_player\generated\source\buildConfig\release\com\jhomlala\better_player\BuildConfig.java:4: error: cannot access com.jhomlala.better_player
package com.jhomlala.better_player;
^
zip END header not found
1 error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':better_player:compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* 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 30s
Running Gradle task 'assembleRelease'... 32.5s
Gradle task assembleRelease failed with exit code 1
PS C:\Users\deuts\OneDrive\Bureau\vox\NewsPro v2.1.0\newspro\news_pro>

Related

Execution failed for task ':sign_in_with_apple:parseDebugLocalResources'. vscode

i tried to use the flutter stripe dependecy , then i had to upgrade gradle and kotlin i struggled a little they supposed to me to delete gradle-wrapper.jar,then it get created as damaged file, after that i am getting this error
Launching lib\main.dart on CPH2043 in debug mode...
lib\main.dart:1
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':sign_in_with_apple:parseDebugLocalResources'.
> Could not resolve all files for configuration ':sign_in_with_apple:androidApis'.
> Failed to transform android.jar to match attributes {artifactType=android-platform-attr, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
> Execution failed for PlatformAttrTransform: C:\Users\Dell\AppData\Local\Android\sdk\platforms\android-28\android.jar.
> C:\Users\Dell\AppData\Local\Android\sdk\platforms\android-28\android.jar
* 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 49s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
i tried flutter pub cache repair ,
i tried gradlew clean build ,
i desinstall and install flutter extention ,

Flutter: When I run this code flutter build appbundle this error occurs

PS C:\Users\saikr\projects\Todo-Flutter-master> flutter build appbundle
Building with sound null safety
Removed unused resources: Binary resource data reduced from 36KB to 28KB: Removed 21%
FAILURE: Build failed with an exception.
What went wrong:
A problem was found with the configuration of task ':app:signingConfigWriterRelease' (type 'SigningConfigWriterTask').
No value has been specified for property 'signingConfig.keyPassword'.
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 34s
Running Gradle task 'bundleRelease'... 95.7s
Gradle task bundleRelease failed with exit code 1
Anyone know how to solve this error? if so do let me know
try to create a new sign key, I think your sign key is broken

Could not resolve all task dependencies for configuration ':google_sign_in:debugCompileClasspath'

App was working completely fine but suddenly it is invoking the following issue.
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':google_sign_in:compileDebugAidl'.
> Could not resolve all task dependencies for configuration ':google_sign_in:debugCompileClasspath'.
> Could not resolve project :google_sign_in_web.
Required by:
project :google_sign_in
> Unable to find a matching configuration of project :google_sign_in_web:
- None of the consumable configurations have attributes.
* 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 2s
Finished with error: Gradle task assembleDebug failed with exit code 1
I have imported the latest google_sign_in package in pubspec.yaml but still facing the same build failed error. Any help please!
Solved it by running following command in flutter terminal:
flutter pub cache repair
All of the packages were downloaded and re-installed again.

can not generate flutter apk file

I'm trying to generate flutter apk file using the following command
flutter build apk --target-platform=android-arm
but I've got the following error
FAILURE: Build failed with an exception.
What went wrong:
Could not resolve all files for configuration ':app:releaseCompileClasspath'.
Could not download flutter_embedding_release.jar (io.flutter:flutter_embedding_release:1.0.0-e1e6ced81d029258d449bdec2ba3cddca9c2ca0c)
Could not get resource 'http://download.flutter.io/io/flutter/flutter_embedding_release/1.0.0-e1e6ced81d029258d449bdec2ba3cddca9c2ca0c/flutt
er_embedding_release-1.0.0-e1e6ced81d029258d449bdec2ba3cddca9c2ca0c.jar'.
Read timed out
Could not download armeabi_v7a_release.jar (io.flutter:armeabi_v7a_release:1.0.0-e1e6ced81d029258d449bdec2ba3cddca9c2ca0c)
Could not get resource 'http://download.flutter.io/io/flutter/armeabi_v7a_release/1.0.0-e1e6ced81d029258d449bdec2ba3cddca9c2ca0c/armeabi_v7a
_release-1.0.0-e1e6ced81d029258d449bdec2ba3cddca9c2ca0c.jar'.
Read timed out
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 insigh
ts.
Get more help at https://help.gradle.org
BUILD FAILED in 1m 3s
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done 64.6s
Gradle task assembleRelease failed with exit code 1
how to solve this problem ??

Execution failed for task ':app:compileDebugJavaWithJavac'. flutter

my project was going great till i ran flutter clean and then tried to run my app on android,where i got this error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
* 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 20s
Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
This issue will most likely occur when the dependencies of your app is not compatible with your development environment.
On the following SO posts, the best solution for this error is to update the dependencies as also mentioned in the comment above. To backup the references, you can refer to this SO post that exhibits the issues encountered:
Flutter error: Execution failed for task ':app:compileDebugJavaWithJavac'
Execution Failed for task :app:compileDebugJavaWithJavac in Android Studio