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.
Related
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?
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 ?
I am trying to build an android apk, when I run the app or flutter build apk the following error occurs, i'm using flutter 3.0.5.
💪 Building with sound null safety 💪
FAILURE: Build failed with an exception.
* Where:
Script '/Users/edgar/Documents/tools/flutter-35/packages/flutter_tools/gradle/flutter.gradle' line: 1156
* What went wrong:
Execution failed for task ':app:compileFlutterBuildRelease'.
> Process 'command '/Users/edgar/Documents/tools/flutter-35/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 45s
Running Gradle task 'assembleRelease'... 47,0s
Gradle task assembleRelease failed with exit code 1
FAILURE: Build failed with an exception.
Where:
Script 'C:\Users\wasiq\Downloads\flutter_windows_1.22.2-stable\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1035
What went wrong:
Execution failed for task ':app:compileFlutterBuildRelease'.
Process 'command 'C:\Users\wasiq\Downloads\flutter_windows_1.22.2-stable\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 11m 3s
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done 664.8s
Gradle task assembleRelease failed with exit code 1
I am using the url_launcher package in flutter and it gives me this error.. If i remove this package then everythin works fine, How to fix this Thing ?
/F:/Program%20Files/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.6.0/lib/url_launcher.dart:10:8: Error: Error when reading '/F:/Program%20Files/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_platform_interface-1.0.8/lib/url_launcher_platform_interface.dart': The system cannot find the path specified.
import 'package:url_launcher_platform_interface/url_launcher_platform_interface.dart';
^
/F:/Program%20Files/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.6.0/lib/url_launcher.dart:92:29: Error: Getter not found: 'UrlLauncherPlatform'.
final bool result = await UrlLauncherPlatform.instance.launch(
^^^^^^^^^^^^^^^^^^^
/F:/Program%20Files/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.6.0/lib/url_launcher.dart:116:16: Error: Getter not found: 'UrlLauncherPlatform'.
return await UrlLauncherPlatform.instance.canLaunch(urlString);
^^^^^^^^^^^^^^^^^^^
/F:/Program%20Files/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.6.0/lib/url_launcher.dart:131:16: Error: Getter not found: 'UrlLauncherPlatform'.
return await UrlLauncherPlatform.instance.closeWebView();
^^^^^^^^^^^^^^^^^^^
FAILURE: Build failed with an exception.
* Where:
Script 'F:\Program Files\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 904
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'F:\Program Files\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 8m 42s
Exception: Gradle task assembleDebug failed with exit code 1