作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
在源代码中运行“flutter pub get”... 5.9s
正在运行 Gradle 任务“bundleRelease”...
在字体中找不到代码点 58848,正在中止。
目标 aot_android_asset_bundle 失败:FontSubset 错误:字体子集设置失败,退出代码为 -1。
构建失败。
FAILURE:构建失败并出现异常。
Process 'command 'C:\src\flutter\bin\flutter.bat'' finished with non-zero exit value 1
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with
flutter.sdk in the local.properties file.")
}
def flutterVersionCode =
localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
android {
compileSdkVersion 28
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
applicationId "com.indianstore.onlineshopping"
minSdkVersion 19
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
resConfigs "en"
}
signingConfigs {
release {
if (System.getenv()["CI"]) { // CI=true is exported by Codemagic
storeFile file(System.getenv()["FCI_BUILD_DIR"] + "/indianstorekey.jks")
storePassword System.getenv()["FCI_KEYSTORE_PASSWORD"]
keyAlias System.getenv()["FCI_KEY_ALIAS"]
keyPassword System.getenv()["FCI_KEY_PASSWORD"]
} else {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.release
shrinkResources true
minifyEnabled true
useProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
signingConfig signingConfigs.release
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
flutter {
source '../..'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
implementation 'com.android.support:multidex:1.0.3'
}
apply plugin: 'com.google.gms.google-services'
googleServices { disableVersionCheck = true }
最佳答案
遇到了同样的问题。
与 flutter build appbundle --verbose
我找到了根本原因。它基于自定义图标,这是我很久以前用 http://fluttericon.com/ 构建的。 .
所以有3种可能的解决方案:
关于android - 应用程序 :compileFlutterBuildRelease error while building app flutter,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62781193/
在源代码中运行“flutter pub get”... 5.9s 正在运行 Gradle 任务“bundleRelease”... 在字体中找不到代码点 58848,正在中止。 目标 aot_andr
我是一名优秀的程序员,十分优秀!