我试图在google play上传我的apk并遇到错误消息:"你上传了一个可调试的APK.出于安全考虑,你需要先禁用调试才能在Google Play上发布.了解有关debuggable APK的更多信息."
然后我android:debuggable="false"在我的清单中写道并再次尝试.我遇到了同样的错误,所以我从我的模块中选择了构建版本来释放并再次生成一个apk,但是这产生了这个错误:
Error:Gradle: Execution failed for task ':app:lintVitalRelease'.
Lint found fatal errors while assembling a release target.
To proceed, either fix the issues identified by lint, or modify your build script as follows:
...
android {
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
}
...
Run Code Online (Sandbox Code Playgroud) 我正在尝试运行我正在我的设备上编写的 flutter 应用程序,但是当我尝试运行时,我从未通过“assembleDebug”阶段并在终端中收到此消息:
Launching lib\main.dart on SM N950U in debug mode...
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not find com.android.tools.build:gradle:5.6.2.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/5.6.2/gradle-5.6.2.pom
- https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/5.6.2/gradle-5.6.2.jar
- https://jcenter.bintray.com/com/android/tools/build/gradle/5.6.2/gradle-5.6.2.pom
- https://jcenter.bintray.com/com/android/tools/build/gradle/5.6.2/gradle-5.6.2.jar
Required by:
project :
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option …Run Code Online (Sandbox Code Playgroud) FAILURE: Build failed with an exception.
Run Code Online (Sandbox Code Playgroud)
出了什么问题:任务“:app:lintVitalRelease”的执行失败。
无法解析配置“:app:debugRuntimeClasspath”的所有工件。无法转换 libs.jar 以匹配属性 {artifactType=processed-jar, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}。JetifyTransform 执行失败:E:\AndroidStudioProjects\FlutterProject\EduyaariGuruFlutter\eduyaari_guru_flutter\build\app\intermediates\flutter\debug\libs.jar。无法使用 Jetifier 转换“E:\AndroidStudioProjects\FlutterProject\EduyaariGuruFlutter\eduyaari_guru_flutter\build\app\intermediates\flutter\debug\libs.jar”。原因:FileNotFoundException,消息:E:\AndroidStudioProjects\FlutterProject\EduyaariGuruFlutter\eduyaari_guru_flutter\build\app\intermediates\flutter\debug\libs.jar(系统找不到指定的路径)。(使用 --stacktrace 运行以获取更多详细信息。http://issuetracker.google.com/issues/new?component=460323。
尝试:使用 --stacktrace 选项运行以获取堆栈跟踪。使用 --info 或 --debug 选项运行以获得更多日志输出。使用 --scan 运行以获得完整的见解。
在https://help.gradle.org获取更多帮助
BUILD 在 1m 8s 内失败
我收到一条错误消息,指出“无法转换 libs.jar 以匹配属性”,因为“转换的输入文件不存在”。这是在 Flutter 中构建发布版 APK 时发生的。
我该如何解决?
mianumararshad@Mians-MacBook-Pro driverSide % flutter build apk --release
You are building a fat APK that includes binaries for android-arm, android-arm64, android-x64.
If you are deploying the app to the Play Store, it's recommended to use app bundles or split the APK to reduce the APK size.
To generate an app bundle, run:
flutter build appbundle --target-platform android-arm,android-arm64,android-x64
Learn more on: https://developer.android.com/guide/app-bundle
To split the APKs per ABI, run:
flutter build apk --target-platform android-arm,android-arm64,android-x64 …Run Code Online (Sandbox Code Playgroud)