Skip to content

in api 36, file_picker build not work, please adapt 36 #1842

Description

@android-dev2015

Before creating an issue, make sure that you are on the latest file_picker version and that there aren't already any similar opened inssues. Also, check if it isn't described on the Wiki, specially on Troubleshooting page.

Also, sometimes a simple flutter clean and flutter build again with latest file_picker version, may end up by fixing cached issues, so I encourage you to first do so.

Describe the bug
A clear and concise description of what the bug is. If the issue happens to be on Android, please make sure that it also happens with a different device/simulator and/or version.

Platform

  • Android
  • iOS
  • Web
  • Desktop

Platform OS version
What version did it happen?

How are you picking?

Please, post the snippet here

Details to reproduce the issue
Provide all the details to reproduce the issue.

Error Log

  • What went wrong:
    Execution failed for task ':file_picker:checkDebugAarMetadata'.

A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
2 issues were found when checking AAR metadata:

   1.  Dependency 'androidx.core:core-ktx:1.15.0' requires libraries and applications that
       depend on it to compile against version 35 or later of the
       Android APIs.

       :file_picker is currently compiled against android-34.

       Recommended action: Update this project to use a newer compileSdk
       of at least 35, for example 36.

       Note that updating a library or application's compileSdk (which
       allows newer APIs to be used) can be done separately from updating
       targetSdk (which opts the app in to new runtime behavior) and
       minSdk (which determines which devices the app can be installed
       on).

   2.  Dependency 'androidx.core:core:1.15.0' requires libraries and applications that
       depend on it to compile against version 35 or later of the
       Android APIs.

       :file_picker is currently compiled against android-34.

       Recommended action: Update this project to use a newer compileSdk
       of at least 35, for example 36.

       Note that updating a library or application's compileSdk (which
       allows newer APIs to be used) can be done separately from updating
       targetSdk (which opts the app in to new runtime behavior) and
       minSdk (which determines which devices the app can be installed
       on).

Screenshots and/or video
If applicable, add screenshots or video to help explain your problem.

Flutter Version details
[√] Flutter (Channel beta, 3.35.0-0.1.pre, on Microsoft Windows [版本 10.0.26100.4202], locale zh-CN) [473ms]
• Flutter version 3.35.0-0.1.pre on channel beta at D:\flutter\Android\flutter-sdk\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision c0f2a1dd60 (33 hours ago), 2025-07-21 10:13:44 -0700
• Engine revision 1c9c20e7c3
• Dart version 3.9.0 (build 3.9.0-333.2.beta)
• DevTools version 2.48.0
• Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-native-assets

[√] Windows Version (Windows 11 or higher, 24H2, 2009) [3.2s]

[√] Android toolchain - develop for Android devices (Android SDK version 36.0.0) [4.2s]
• Android SDK at D:\flutter\Android\android-sdk
• Emulator version 36.1.5.0 (build_id 13639036) (CL:N/A)
• Platform android-36, build-tools 36.0.0
• ANDROID_HOME = D:\flutter\Android\android-sdk
• Java binary at: D:\flutter\Android\android-studio-canary\jbr\bin\java
This is the JDK bundled with the latest Android Studio installation on this machine.
To manually set the JDK path, use: flutter config --jdk-dir="path/to/jdk".
• Java version OpenJDK Runtime Environment (build 21.0.6+-13391695-b895.109)
• All Android licenses accepted.

[√] Chrome - develop for the web [148ms]
• Chrome at C:\Users\flutter\AppData\Local\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.14.5) [146ms]
• Visual Studio at D:\flutter\Microsoft Visual Studio\2022\Community
• Visual Studio Community 2022 version 17.14.36203.30
• Windows 10 SDK version 10.0.26100.0

[√] Android Studio (version 2025.1.3) [15ms]
• Android Studio at D:\flutter\Android\android-studio-canary
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 21.0.6+-13391695-b895.109)

[√] Connected device (4 available) [573ms]
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [版本 10.0.26100.4202]
• Chrome (web) • chrome • web-javascript • Google Chrome 138.0.7204.101
• Edge (web) • edge • web-javascript • Microsoft Edge 138.0.3351.55

[√] Network resources [765ms]
• All expected network resources are available.

• No issues found!

Additional context
Add any other context about the problem here.

@miguelpruivo

Metadata

Metadata

Assignees

Labels

new issueAn issue that hasn't yet been seen from the maintainer

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions