Skip to content
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

Android apk build error #51

Closed
ziponia opened this issue Aug 8, 2024 · 5 comments
Closed

Android apk build error #51

ziponia opened this issue Aug 8, 2024 · 5 comments

Comments

@ziponia
Copy link

ziponia commented Aug 8, 2024

Hi! @LeGoffMael

thank you for providing a great package.

I'm in the middle of a migration to version 3.24.0 of flutter, and I noticed that the migration tests in your project run differently than expected.

I expected a problem in my project, but it was not solved, so I tried to clone your project and it is reproducing the problem.

I would appreciate it if you could tell me how to solve it.

Error Print

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':insta_assets_crop:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.tasks.VerifyLibraryResourcesTask$Action
   > Android resource linking failed
     ERROR: /my/home/path/insta_assets_picker/example/build/insta_assets_crop/intermediates/merged_res/release/values/values.xml:194: AAPT: error: resource android:attr/lStar not found.

flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.24.0, on macOS 14.5 23F79 darwin-arm64, locale ko-KR)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.1)
[✓] IntelliJ IDEA Ultimate Edition (version 2024.1.4)
[✓] VS Code (version 1.92.0)
[✓] Connected device (5 available)
[✓] Network resources

Reproduce

  1. current project clone
  2. flutter pub get
  3. cd example
  4. flutter run --release or flutter build apk

There seems to be no problem in debug mode or 'flutter build appbundle'.

Additional information

There seems to be no problem in debug mode or 'flutter build appbundle'.

@ps6067966
Copy link

image

Same error in
insta_assets_picker : 3.0.0-dev.1
insta_assets_crop: 0.1.0-dev.2

Please fix this. I need to deliver to client this week. Please please.
@LeGoffMael

@ps6067966
Copy link

@ziponia any solution you found. or any workaround for this?

@ziponia
Copy link
Author

ziponia commented Aug 30, 2024

@ps6067966

No.

As long as it's not an apk, it builds normally, so it wasn't a very urgent issue for me.

If you need to distribute it to your customers right away
Use firebase distribution tools or internal tracks

I don't think the maintainer is interested in this library ;(

@LeGoffMael
Copy link
Owner

LeGoffMael commented Aug 31, 2024

Hi there,

It seems to be an issue with the Flutter 3.24.0.

It has been reported here and here.

As mentioned in the above link adding this workaround in android/build.gradle seems to solve the issue

subprojects {
    afterEvaluate { project ->
        if (project.plugins.hasPlugin("com.android.application") ||
                project.plugins.hasPlugin("com.android.library")) {
            project.android {
                compileSdkVersion 34
                buildToolsVersion "34.0.0"
            }
        }
    }
    ...
}

@LeGoffMael
Copy link
Owner

This error should be gone in the latest 3.1.0 version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants