我已经为我的 Flutter 应用程序创建了 android 版本。
然后我创建了一个内部测试版本。它显示警告
此 App Bundle 包含本机代码,并且您尚未上传调试符号。我们建议您上传符号文件,以便更轻松地分析和调试您的崩溃和 ANR。
基本上我要做的是根据他们显示的链接在 build.gradle 文件中添加以下内容。
android.buildTypes.release.ndk.debugSymbolLevel = { SYMBOL_TABLE | FULL }
Run Code Online (Sandbox Code Playgroud)
我假设他们正在谈论的是 android/app/build.gradle 。
不确定我必须在该文件中的确切位置添加这一行。
有人可以指出在哪里添加这一行吗?
我已在 Macbook 中将 Android Studio 更新到 4.1,但更新后无法运行应用程序。它给出了以下错误
Execution failed for task ':app:stripDebugDebugSymbols'.
NDK at ~/Library/Android/sdk/ndk-bundle did not have a source.properties file
Run Code Online (Sandbox Code Playgroud) 对于 Android Flutter 应用程序,您可以混淆 Dart 代码和本机 Android 代码。
在构建 aab、apk、ipa 或 ios 时使用标志混淆 Dart 代码--obfuscate --split-debug-info=/path/to/place/symbols。
您可以在应用程序级别的 build.gradle 中混淆 Android 本机应用程序
buildTypes {
release {
shrinkResources true
minifyEnabled true
}
Run Code Online (Sandbox Code Playgroud)
现在,我的疑问是我必须上传哪些符号到 Google Play?
但除了象征您下载到计算机的崩溃报告文件之外,没有关于如何使用它们的信息
位于 build\app\intermediates\merged_native_libs\release\out\lib 到 *.zip 并将该 zip 上传到 Google Play
android.*.ndkVersion = "23.1.7779620" | 'your ndk version'
android.*.ndk.debugSymbolLevel = …Run Code Online (Sandbox Code Playgroud) 我正在尝试将 Android 应用程序发布到 Google Play 并收到警告:
This App Bundle contains native code, and you've not uploaded debug symbols.
We recommend you upload a symbol file to make your crashes and ANRs easier to analyze and debug.
Run Code Online (Sandbox Code Playgroud)
我在一份文档中发现,我应该添加
android.buildTypes.release.ndk.debugSymbolLevel = { SYMBOL_TABLE | FULL }
Run Code Online (Sandbox Code Playgroud)
行到build.gradle文件和另一个文档中,我应该添加
android.defaultConfig.ndk.debugSymbolLevel = 'FULL'
Run Code Online (Sandbox Code Playgroud)
行到build.gradle文件。
哪一个是正确的?
无论如何,两者都不起作用。
如果我将这一行(按原样)添加到build.gradle(字面上遵循文档),我会收到Gradle无法找到ndk或debugSymbolLevel名称的错误。
如果我将该行(按原样)添加到gradle.properties,则它没有任何效果:aab文件看起来具有相同的大小并且警告仍然存在。
如何实现?
在项目设置(文件 -> 项目结构)中,“Android NDK 位置”字段显示为灰色:
单击“下载 Android NDK”会短暂显示一些对话框。安装了几个版本的 NDK:
我的设置有什么问题?
主机:Ubuntu 18.04 LTS
Android Studio 4.1.1 Build #AI-201.8743.12.41.6953283,构建于2020年11月5日 运行时版本:1.8.0_242-release-1644-b3-6222593 amd64 VM:OpenJDK 64-Bit Servers VM by Jet5B.Linux 0-128-generic GC: ParNew, ConcurrentMarkSweep Memory: 2014M Cores: 4 Registry: ide.new.welcome.screen.force=true, external.system.auto.import.disabled=true, debugger.watches.in.variables= false 非捆绑插件:com.intellij.ideolog、org.jetbrains.kotlin 当前桌面:LXDE
提交的错误报告
在 android studio 上使用 flutter 构建我的应用程序,当我上传我的应用程序包(通过 制作)时flutter build appbundle,会弹出消息:
Warning\n\nThis App Bundle contains native code, and youve not uploaded debug symbols. We recommend you upload a symbol file to make your crashes and ANRs easier to analyze and debug. Learn More\nRun Code Online (Sandbox Code Playgroud)\n我已经尝试了当前在线的所有解决方案来解决此问题。以下各项的每种组合:
\n这些解决方案:
升级到 Flutter 2.10.0
\n升级到 Android Studio Bumblebee | 2021.1.1 补丁 1 并单击检查更新,它会响应You already have the latest version of Android …
android android-ndk android-gradle-plugin flutter google-play-console
我正在尝试将我的 Flutter 应用程序包从 Mac 上传到 Google Play,但收到有关添加“调试符号”的警告:
此应用程序包包含本机代码,并且您尚未上传调试符号。我们建议您上传符号文件,以便更轻松地分析和调试崩溃和 ANR。
根据这个答案,我需要压缩这三个文件夹并将其作为“调试符号”上传。
但是,在尝试上传压缩文件时出现上述错误:
本机调试符号包含无效目录 __MACOSX。仅支持 Android ABI。
问题是什么?我应该怎么办?
android ×6
flutter ×4
android-ndk ×3
build.gradle ×1
debugging ×1
google-play ×1
macos ×1
native ×1
release ×1
ubuntu-18.04 ×1