Skip to content

unable to build simple android project #350

@smacz

Description

@smacz

Hello,

I'm totally new to this so please cut me some slack.

I run this image, create project with

flutter create -t app --platform android test_app

then cd into it and run

flutter build apk

this is what I get

# flutter build apk

Checking the license for package Android SDK Build-Tools 33.0.1 in /opt/android-sdk-linux/licenses
License for package Android SDK Build-Tools 33.0.1 accepted.
Preparing "Install Android SDK Build-Tools 33.0.1 v.33.0.1".
"Install Android SDK Build-Tools 33.0.1 v.33.0.1" ready.
Installing Android SDK Build-Tools 33.0.1 in /opt/android-sdk-linux/build-tools/33.0.1
"Install Android SDK Build-Tools 33.0.1 v.33.0.1" complete.
"Install Android SDK Build-Tools 33.0.1 v.33.0.1" finished.
Checking the license for package Android SDK Platform 35 in /opt/android-sdk-linux/licenses
License for package Android SDK Platform 35 accepted.
Preparing "Install Android SDK Platform 35 (revision 2)".
"Install Android SDK Platform 35 (revision 2)" ready.
Installing Android SDK Platform 35 in /opt/android-sdk-linux/platforms/android-35
"Install Android SDK Platform 35 (revision 2)" complete.
"Install Android SDK Platform 35 (revision 2)" finished.
Font asset "MaterialIcons-Regular.otf" was tree-shaken, reducing it from 1645184 to 1384 bytes (99.9% reduction). Tree-shaking can be disabled by providing the --no-tree-shake-icons flag when building your app.
Target android_aot_release_android-arm failed: ProcessException: Failed to find "/sdks/flutter/bin/cache/artifacts/engine/android-arm-release/linux-arm64/gen_snapshot" in the search path.
  Command: /sdks/flutter/bin/cache/artifacts/engine/android-arm-release/linux-arm64/gen_snapshot 
Target android_aot_release_android-arm64 failed: ProcessException: Failed to find "/sdks/flutter/bin/cache/artifacts/engine/android-arm64-release/linux-arm64/gen_snapshot" in the search path.
  Command: /sdks/flutter/bin/cache/artifacts/engine/android-arm64-release/linux-arm64/gen_snapshot 
Target android_aot_release_android-x64 failed: ProcessException: Failed to find "/sdks/flutter/bin/cache/artifacts/engine/android-x64-release/linux-arm64/gen_snapshot" in the search path.
  Command: /sdks/flutter/bin/cache/artifacts/engine/android-x64-release/linux-arm64/gen_snapshot 


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileFlutterBuildRelease'.
> Process 'command '/sdks/flutter/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 52s
Running Gradle task 'assembleRelease'...                          113.1s
Gradle task assembleRelease failed with exit code 1

what can I do to solve this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions