abu0306 / flutter_root_jailbreak

MIT License
5 stars 4 forks source link

Upgrade `compileSdkVersion` from `30` to `34` #6

Open pastelcode opened 3 weeks ago

pastelcode commented 3 weeks ago

Error:

FAILURE: Build failed with an exception.

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

* 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 5m 22s
Running Gradle task 'assembleRelease'...                          323.2s

┌─ Flutter Fix ──────────────────────────────────────────────────────────────────────────────────────────┐
│ [!] Your project requires a newer version of the Kotlin Gradle plugin.                                 │
│ Find the latest version on https://kotlinlang.org/docs/releases.html#release-details, then update the  │
│ version number of the plugin with id "org.jetbrains.kotlin.android" in the plugins block of            │
│ /Users/ssmg/Bancrea_app/android/settings.gradle.                                                       │
│                                                                                                        │
│ Alternatively (if your project was created before Flutter 3.19), update                                │
│ /Users/ssmg/Bancrea_app/android/build.gradle                                                           │
│ ext.kotlin_version = '<latest-version>'                                                                │
└────────────────────────────────────────────────────────────────────────────────────────────────────────┘
Gradle task assembleRelease failed with exit code 1

It occurs with Flutter 3.24.

It get fixed by upgrading the current compileSdkVersion from 30 to 34 in Android project.

pastelcode commented 3 weeks ago

While #7 is merged, you can use my fix as this:

In your pubspec.yaml add the following:

dependencies:
  # your other dependencies

dependency_overrides:
  flutter_root_jailbreak:
    git:
      url: https://github.com/pastelcode/flutter_root_jailbreak.git