失败:构建失败并出现异常。
执行 com.android.build.gradle.internal.tasks.FinalizeBundleTask$BundleToolRunnable java.lang.NullPointerException 时发生失败(无错误消息)
尝试:使用 --stacktrace 选项运行以获取堆栈跟踪。使用 --info 或 --debug 选项运行以获得更多日志输出。使用 --scan 运行以获得完整的见解。
在https://help.gradle.org获取更多帮助
在 24 秒内构建失败运行 Gradle 任务“bundleRelease”...26.2s Gradle 任务bundleRelease 失败,退出代码为 1
Build.gradle 文件:-
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) { …Run Code Online (Sandbox Code Playgroud)