shorebirdtech / shorebird

Code Push for Flutter and other tools for Flutter businesses.
https://shorebird.dev
Other
2.2k stars 132 forks source link

fix: Cannot Build an Apk using "shorebird release " #2447

Open thewama33 opened 2 weeks ago

thewama33 commented 2 weeks ago

App ID: (9288d81e-cf57-4000-b90f-51f6993ecb4c)

Description

Every time I try to build a release apk from my project, the terminal only creates aab before crashing after constructing the apk version. I've provided the log full below.

Steps To Reproduce

  1. Opened Project
  2. Opened VSCode Terminal
  3. type command shorebird release android --artifact apk
  4. See error

Expected Behavior

Building android release apk

Screenshots

Screenshot 2024-08-27 at 3 06 02 PM

Additional Context

Shorebird 1.2.2 • git@github.com:shorebirdtech/shorebird.git Flutter 3.24.1 • revision 01eadfbfbbe78b64aed76ea9f422eb432fd339cb Engine • revision 8978a5e50daa39aa1180d57c7ec991e787d7f545

OS Information:

Chip : Apple M1 macOs: Sonoma 14.5 (23F79)

Build Log file :

1724759443148_shorebird.log [Uploading 1724759443148_shorebird.log…]()

bryanoltman commented 2 weeks ago

It looks like the error is:

[        ] FAILURE: Build failed with an exception.
[        ] * What went wrong:
[        ] Execution failed for task ':charset_converter:verifyReleaseResources'.
[        ] > A failure occurred while executing com.android.build.gradle.tasks.VerifyLibraryResourcesTask$Action
[        ]    > Android resource linking failed
[        ]      ERROR:/Users/omar/Documents/stp.mobile/build/charset_converter/intermediates/merged_res/release/values/values.xml:194: AAPT: error: resource android:attr/lStar not found.
[        ] * Try:
[        ] > Run with --debug option to get more log output.
[        ] > Run with --scan to get full insights.
[        ] * Exception is:
[        ] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':charset_converter:verifyReleaseResources'.

Can you verify that:

  1. Your app builds without Shorebird (flutter build appbundle)
  2. You are using the same version of Flutter as Shorebird (3.24.1`
thewama33 commented 2 weeks ago
  1. yes definitely its building appbundle and apk by using. flutter build apk and flutter build appbundle but its not building by using shorebird

  2. project : environment: sdk: ">=3.1.0 <4.0.0"

flutter --version

Flutter 3.24.0 • channel stable • https://github.com/flutter/flutter.git Framework • revision 80c2e84975 (4 weeks ago) • 2024-07-30 23:06:49 +0700 Engine • revision b8800d88be Tools • Dart 3.5.0 • DevTools 2.37.2

shorebird --version

Shorebird 1.2.2 • git@github.com:shorebirdtech/shorebird.git Flutter 3.24.1 • revision 01eadfbfbbe78b64aed76ea9f422eb432fd339cb Engine • revision 8978a5e50daa39aa1180d57c7ec991e787d7f545

bryanoltman commented 2 weeks ago

Very weird that it would work with Flutter 3.24.0 and not 3.24.1. Out of curiosity, does flutter build appbundle --release work?

thewama33 commented 2 weeks ago

iv'e tried to downgrade flutter version into 3.16.0 but still the same issue

bryanoltman commented 2 weeks ago

I don't imagine downgrading would help

thewama33 commented 1 week ago

iam still facing the same issue no updates

bryanoltman commented 1 week ago

Sorry, I was waiting for an answer to the question of whether flutter build appbundle --release (specifically with the release flag) also worked