最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Flutter Android App Not Generating APK or Running on Physical Device - Stack Overflow

programmeradmin0浏览0评论

I am new to flutter facing issues while building and running my Flutter app on an Android device. The app runs perfectly on Chrome using:

flutter run -d chrome

However, when I try to:

  1. Build an APK:

    flutter build apk
    

    It fails with errors.

  2. Run on a physical device:

    flutter run -d <device_id>
    

    It fails with an error.

I have ensured the following:

  • Java version: 23
  • Flutter SDK: Latest
  • Android licenses: All accepted
  • Gradle version: 8.10
  • Kotlin version: 2.1.0
  • VS Code & Android Studio: Installed and used for debugging
  • Windows 11: Running on this OS

Additionally, the Android emulator crashes when I try to run the app.

What I Have Tried

  • Running flutter doctor (No issues reported)
  • Cleaning the project with flutter clean
  • Running flutter pub get
  • Checking Gradle and Android dependencies
  • Reinstalling Android Studio and VS Code

I am completely frustrated as I cannot test my app on Android devices. Any help in troubleshooting this issue would be greatly appreciated!

Questions

  1. How can I resolve the APK build failure?
  2. Why is my app not running on a physical Android device?
  3. Are there compatibility issues with Java 23 and my Flutter setup?

This should help you get clear responses on Stack Overflow. Before posting, try running flutter doctor -v and include its output in your question for better troubleshooting.

发布评论

评论列表(0)

  1. 暂无评论