-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flutter apk Build Error #1
Comments
I'm also unable to build, but with a different error.
Build using stable channel and made sure to clear pub cache and upgrade all dependencies. >flutter build apk --debug
//AppData/Local/Pub/Cache/hosted/pub.dev/agent_dart-1.0.0-dev.20/lib/archiver/encoder.dart:162:8: Error: The return type of the method 'SingingBlockZipFileEncoder.close' is 'void', which does not match the return type, 'Future<void>', of the overridden method, 'ZipFileEncoder.close'.
- 'Future' is from 'dart:async'.
Change to a subtype of 'Future<void>'.
void close() {
^
//AppData/Local/Pub/Cache/hosted/pub.dev/archive-3.5.1/lib/src/io/zip_file_encoder.dart:235:16: Context: This is the overridden method ('close').
Future<void> close() async {
^
Target kernel_snapshot failed: Exception
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'd:\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 29s
Running Gradle task 'assembleDebug'... 30,0s
Gradle task assembleDebug failed with exit code 1 |
I got the same error than @KingGorrin. I believe @0x3639 is just missing the Android toolchain stuff, since he is trying to build an Android apk. Just follow the flutter doctor instructions. |
@0x3639 please reinstall the Android toolchain and retry. @KingGorrin @coinselor the problem you're encountering is due to a transitive library mismatch, more specifically the archive package. agent_dart Fixed by adding a Feel free to close the issue if it works for you. Thanks! |
This fixed the issue. |
I tried to build with
flutter pub get
then
flutter build apk --release
And got the following errors.
UPDATE: Looks like I'm missing some android components. I will try to install them.
The text was updated successfully, but these errors were encountered: