Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Bug]: Unable to build android project with the flutter 3.24.3 (Android Studio Ladybug | 2024.2.1, Gradle 21.0.3 ) #1396

Closed
3 of 5 tasks
sudoadarsh opened this issue Oct 17, 2024 · 1 comment

Comments

@sudoadarsh
Copy link

Please check the following before submitting a new issue.

Please select affected platform(s)

  • Android
  • iOS
  • Windows

Steps to reproduce

  1. Create a new flutter project from Android Studio Ladybug (2024.2.1)
  2. Add permission_handler as the dependency.
  3. Open android project, sync and build the project.

Note: Working fine for flutter version 3.22.3

Expected results

Build runs successfully.

Actual results

:permission_handler_android:processDebugAndroidTestManifest
`Execution failed for task ':permission_handler_android:processDebugAndroidTestManifest'.

Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [androidx.fragment:fragment:1.7.1] /Users/sudoadarsh/.gradle/caches/transforms-3/63d3b185799b2c098a0f6ed885ea8db1/transformed/fragment-1.7.1/AndroidManifest.xml as the library might be using APIs not available in 16
Suggestion: use a compatible library with a minSdk of at most 16,
or increase this project's minSdk version to at least 19,
or use tools:overrideLibrary="androidx.fragment" to force usage (may lead to runtime failures)

  • 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.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.3/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD FAILED in 53s
110 actionable tasks: 105 executed, 5 up-to-date
`

Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [androidx.fragment:fragment:1.7.1] /Users/sudoadarsh/.gradle/caches/transforms-3/63d3b185799b2c098a0f6ed885ea8db1/transformed/fragment-1.7.1/AndroidManifest.xml as the library might be using APIs not available in 16
Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [androidx.fragment:fragment:1.7.1] /Users/sudoadarsh/.gradle/caches/transforms-3/63d3b185799b2c098a0f6ed885ea8db1/transformed/fragment-1.7.1/AndroidManifest.xml as the library might be using APIs not available in 16 Suggestion: use a compatible library with a minSdk of at most 16, or increase this project's minSdk version to at least 19, or use tools:overrideLibrary="androidx.fragment" to force usage (may lead to runtime failures)

Code sample

Just the default project created by flutter create with this plugin added.

Screenshots or video

Screenshots or video demonstration

[Upload media here]

Version

11.3.1

Flutter Doctor output

Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.24.3, on macOS 15.0 24A335 darwin-arm64, locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/to/macos-android-setup for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 16.0)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.2)
[✓] VS Code (version 1.94.2)
[✓] Connected device (5 available)            
    ! Error: Browsing on the local area network for iPhone 12 mini. Ensure the device is unlocked and attached with a cable or associated with the
      same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)
[✓] Network resources

! Doctor found issues in 1 category.
@mvanbeusekom
Copy link
Member

Hi @sudoadarsh,

I have just published version 12.0.3 of the permission_handler_android package updating the Android minSdkVersion to 19 which should solve this issue.

To update please run the following command:

flutter pub upgrade permission_handler_android

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

No branches or pull requests

2 participants