android - android studio 3.5 之后 Flutter App 将无法构建 appbundle/APK 或在 Android 上运行
问题描述
基本上我的应用程序在 iOS 上运行和构建,但在我将 Android Studio 更新到 3.5 版本后不再在 Android 上运行,我真的需要能够在 Playstore 上发布版本。
我已经尝试了很多东西,但没有任何效果我期待有人给我解决我的问题!我很绝望 !
这是我的颤振医生 -v日志:
[✓] Flutter (Channel unknown, v1.9.1+hotfix.5, on Mac OS X 10.15 19A602, locale en-FR)
• Flutter version 1.9.1+hotfix.5 at /Users/axel/flutter
• Framework revision 1aedbb1835 (6 days ago), 2019-10-17 08:37:27 -0700
• Engine revision b863200c37
• Dart version 2.5.0
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
• Android SDK at /Users/axel/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.1
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.1, Build version 11A1027
• CocoaPods version 1.8.4
[✓] Android Studio (version 3.5)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 40.2.2
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
[✓] VS Code (version 1.39.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.5.1
[✓] Connected device (1 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)
• No issues found!
解决方案
你只需要修改 android>app>build.gradle 中的 build.gradle :
buildTypes {
release {
signingConfig signingConfigs.release
//minifyEnabled true
//useProguard true
//proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
那么你也能:
flutter clean
flutter build appbundle --release
推荐阅读
- javascript - 如何在 vue js 中创建多行表单?
- python - Cherrypy 和多进程/线程
- vba - 从子表单的组合框中选择下拉菜单后,MS Access 在主表单中填写 ID
- azure - 编写 Azure 时序见解数据访问策略脚本
- xamarin - 如何导入二维码以登录 Xamarin.Forms
- sql - 在 LIKE 语句中序列化多个值
- java - 在字符串的数据类型中,我有时间格式为 day:hh:mm:ss。我怎样才能将其转换为单一的天数格式?
- python - Python3.7 Pandas1.0.1 Dataframe - 计算一个范围内的列总和并重新组合为一个新行?
- angular - shareReplay:我可以将缓冲区大小重置或设置为 0,以便新的 subriptions 必须等待新的发射
- mysql - SELECT inner Join Group by sub query extract in a single row