英文:
Error while creating .aab in android studio
问题
以下是您要翻译的内容:
我正在使用 Android Studio 4.0.1。当我想将我的应用程序转换为 .aab 格式时,我遇到了以下错误。我该怎么办?
构建失败:发生异常。
* 出现了什么问题:
任务“:app:mergeDexRelease”的执行失败。
> 无法解析配置“:app:releaseRuntimeClasspath”的所有文件。
> 无法将 kotlin-stdlib-1.3.50.jar(org.jetbrains.kotlin:kotlin-stdlib:1.3.50)转换为匹配属性的文件 {artifactType=android-dex, dexing-enable-desugaring=true, dexing-incremental-desugaring-v2=false, dexing-is-debuggable=false, dexing-min-sdk=17, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}。
> DexingWithClasspathTransform 的执行失败:C:\Users\user\.gradle\caches\transforms-2\files-2.1ae7b36524b4d2df17c0bae7e36de153\jetified-kotlin-stdlib-1.3.50.jar。
> 无法解析结果路径字符串:
* 尝试:
使用 --stacktrace 选项运行以获取堆栈跟踪信息。使用 --info 或 --debug 选项运行以获取更多日志输出。使用 --scan 运行以获取完整洞察信息。
* 在 https://help.gradle.org 获取更多帮助
英文:
I am using Android Studio 4.0.1. When I want to convert my application to .aab format, I get the following error. What should I do?
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeDexRelease'.
> Could not resolve all files for configuration ':app:releaseRuntimeClasspath'.
> Failed to transform kotlin-stdlib-1.3.50.jar (org.jetbrains.kotlin:kotlin-stdlib:1.3.50) to match attributes {artifactType=android-dex, dexing-enable-desugaring=true, dexing-incremental-desugaring-v2=false, dexing-is-debuggable=false, dexing-min-sdk=17, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}.
> Execution failed for DexingWithClasspathTransform: C:\Users\user\.gradle\caches\transforms-2\files-2.1ae7b36524b4d2df17c0bae7e36de153\jetified-kotlin-stdlib-1.3.50.jar.
> Cannot parse result path string:
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
答案1
得分: 0
你可以在onCreate()中使用以下代码:
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
英文:
You can use
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
in onCreate()
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论