问题描述
我已经创建了Flutter应用程序的android版本.
然后,我创建了一个内部测试版本.它显示警告
基本上,我要做的是根据它们显示的链接在build.gradle文件中添加以下内容.
android.buildTypes.release.ndk.debugSymbolLevel = {SYMBOL_TABLE |满的 }
我认为这是他们正在谈论的android/app/build.gradle.
不确定在该文件中的确切位置,我必须添加此行.
有人可以指出在何处添加此行吗?
要使用文档,您需要一个Android gradle插件 4.1或更高版本.在撰写本文时,最新的4.1版本是 4.1.2
您还需要为Android Studio安装 ndk和cmake../p>
在您的android build.gradle中,您需要设置android gradle插件版本4.1.2:
buildscript {...储存库{谷歌()jcenter()}依赖项{classpath'com.android.tools.build:gradle:4.1.2'...}
然后在android/app build.gradle中添加:
...安卓 {...ndkVersion"21.3.6528147"#您会在android studio sdk-manager中看到ndk版本...buildTypes {释放 {...ndk {debugSymbolLevel'SYMBOL_TABLE'}}}}
随后运行时: flutter build appbundle
,它会在一段时间后以两倍大的appbundle完成.
I have created android build of my Flutter application.
Then I created an internal testing release. It is showing a warning
Basically what I had to do is add following to build.gradle file according to the link they show.
android.buildTypes.release.ndk.debugSymbolLevel = { SYMBOL_TABLE | FULL }
I assume it is android/app/build.gradle they are talking about.
Not sure exactly where in that file I have to add this line.
Can someone point out where to add this line?
To use the option ndk debugSymbolLevel as written in the docs you need an android gradle plugin 4.1 or later. At the time of writing the lastest 4.1 version is 4.1.2
You will need also to install ndk and cmake for android studio.
In your android build.gradle you need the to set android gradle plugin version 4.1.2:
buildscript {
...
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.2'
...
}
Then in the android/app build.gradle add:
...
android {
...
ndkVersion "21.3.6528147" # you see the ndk version in the android studio sdk-manager
...
buildTypes {
release {
...
ndk {
debugSymbolLevel 'SYMBOL_TABLE'
}
}
}
}
when you then run: flutter build appbundle
it should finish after a while with an appbundle that is twice the size.
这篇关于如何在build.gradle中添加调试符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!