Target aot_android_asset_bundle failed: Exception: Failed to bundle asset files - android

I have modified the pubspec.yamal with https://stackoverflow.com/a/75254540/20101165 to solve the "ModalBottomSheetRoute' is imported from both 'package:flutter/src/material/bottom_sheet.dart' and package:modal_bottom_sheet" issue, after modifying the file, I tried to build the apk, but the response was an error as follows :
Error detected in pubspec.yaml:
No file or variants found for asset: packages/html_editor_enhanced/summernote.html.
This asset was included from package html_editor_enhanced.
Target aot_android_asset_bundle failed: Exception: Failed to bundle asset files.
FAILURE: Build failed with an exception.
Where:
Script 'E:\Program Files\Android\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1151
What went wrong:
Execution failed for task ':app:compileFlutterBuildRelease'.
Process 'command 'E:\Program Files\Android\flutter\bin\flutter.bat'' finished with non-zero exit value 1
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 14s
Running Gradle task 'assembleRelease'... 75.0s
Gradle task assembleRelease failed with exit code 1
anyone can help me to solve the issue ?

Related

No file or variants found for asset: packages/html_editor_enhanced/summernote.html

while trying to build apk (flutter build apk --releas), it shows error as follows
*Error detected in pubspec.yaml:
No file or variants found for asset: packages/html_editor_enhanced/summernote.html.
This asset was included from package html_editor_enhanced.
Target aot_android_asset_bundle failed: Exception: Failed to bundle asset files.
FAILURE: Build failed with an exception.
Where:
Script 'E:\Program Files\Android\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1151
What went wrong:
Execution failed for task ':app:compileFlutterBuildRelease'.
Process 'command 'E:\Program Files\Android\flutter\bin\flutter.bat'' finished with non-zero exit value 1
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 8s
Running Gradle task 'assembleRelease'... 68.8s
Gradle task assembleRelease failed with exit code 1*
I tried upgrading and downgrading the html_editor_enhanced:., but received the same error.
Anyone who can help me solve the issue?

Flutter github action error while building apk file

Running Gradle task 'assembleRelease'...
lib/Data/Repositories/category/subcategory_repository.dart:1:8: Error: Error when reading 'lib/Data/Data_Providers/category/subcategory_service_api.dart': No such file or directory
import 'package:unicorn_store/Data/Data_Providers/category/subcategory_service_api.dart';
^
lib/Data/Repositories/category/category_respository.dart:1:8: Error: Error when reading 'lib/Data/Data_Providers/category/category_service_api.dart': No such file or directory
import 'package:unicorn_store/Data/Data_Providers/category/category_service_api.dart';
^
lib/Data/Repositories/category/subcategory_repository.dart:6:34: Error: Method not found: 'SubCategoryServiceApi'.
final _subCategoryServiceApi = SubCategoryServiceApi();
^^^^^^^^^^^^^^^^^^^^^
lib/Data/Repositories/category/category_respository.dart:5:31: Error: Method not found: 'CategoryServiceApi'.
final _categoryServiceApi = CategoryServiceApi();
^^^^^^^^^^^^^^^^^^
FAILURE: Build failed with an exception.
Where:
Script '/opt/hostedtoolcache/flutter/2.10.3-stable/x64/packages/flutter_tools/gradle/flutter.gradle' line: 1102
What went wrong:
Execution failed for task ':app:compileFlutterBuildRelease'.
Process 'command '/opt/hostedtoolcache/flutter/2.10.3-stable/x64/bin/flutter'' finished with non-zero exit value 1
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 30s
Running Gradle task 'assembleRelease'... 90.8s
Gradle task assembleRelease failed with exit code 1
Error: Process completed with exit code 1.

Flutter Build error=> What went wrong: Execution failed for task ':app:compileFlutterBuildStagingDebug'

I am trying to use my physical device for a flutter application, I am doing this through visual studio code.
flutter run --flavor=staging
OP: `FAILURE: Build failed with an exception.
Where:
Script 'C:\Users\Anand\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 991
What went wrong:
Execution failed for task ':app:compileFlutterBuildStagingDebug'.
Process 'command 'C:\Users\Anand\flutter\bin\flutter.bat'' finished with non-zero exit value 1
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 6s
Running Gradle task 'assembleStagingDebug'...
Running Gradle task 'assembleStagingDebug'... Done 134.1s
Exception: Gradle task assembleStagingDebug failed with exit code 1`
What should be done in this case?
Thanks

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.

error while generating apk file from react native

> Task :app:bundleReleaseJsAndAssets FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:bundleReleaseJsAndAssets'.
> Process 'command 'npx.cmd'' finished with non-zero exit value 1
* 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 33s
1 actionable task: 1 executed
It seems it's a problem with your build.gradle version at root :
1-Open Android Studio
2-Open the android folder of you project
3-android studio will upgrade the gradle version automatically (make sure it does)
4-try again to generate apk

Categories

Resources