帖子
帖子
用户
博客
课程
显示全部楼层
16
帖子
0
勋章
100
Y币

[开发工具] 打包失败,提示useAndroidX未选中

[复制链接]
发表于 2021-12-29 21:47:42
本帖最后由 星落剑 于 2021-12-30 10:11 编辑

2021-12-29 09:39:41FAILURE: Build failed with an exception.* What went wrong:Execution failed for task ':app:javaPreCompileRelease'.> This project uses AndroidX dependencies, but the 'android.useAndroidX' property is not enabled. Set this property to true in the gradle.properties file and retry.  The following AndroidX dependencies are detected: androidx.collection:collection:1.0.0, androidx.core:core:1.1.0, androidx.versionedparcelable:versionedparcelable:1.1.0, androidx.lifecycle:lifecycle-common:2.0.0, androidx.arch.core:core-common:2.0.0, androidx.lifecycle:lifecycle-runtime:2.0.0, androidx.annotation:annotation:1.1.0* 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**.**BUILD FAILED in 10s
7
帖子
0
勋章
52
Y币
我也是同问
0
帖子
0
勋章
2
Y币
同问,今天编译打包出现这个问题
16
帖子
0
勋章
100
Y币
技术下班了,等明天了
2
帖子
0
勋章
20
Y币
明天谁知道咋弄了,互相告诉一下,都辛苦啦
7
帖子
0
勋章
43
Y币
我也是这个问题
7
帖子
0
勋章
43
Y币
2021-12-29 10:45:37FAILURE: Build failed with an exception.* What went wrong:Execution failed for task ':app:mergeReleaseResources'.> This project uses AndroidX dependencies, but the 'android.useAndroidX' property is not enabled. Set this property to true in the gradle.properties file and retry.  The following AndroidX dependencies are detected: androidx.collection:collection:1.0.0, androidx.core:core:1.1.0, androidx.versionedparcelable:versionedparcelable:1.1.0, androidx.lifecycle:lifecycle-common:2.0.0, androidx.arch.core:core-common:2.0.0, androidx.lifecycle:lifecycle-runtime:2.0.0, androidx.annotation:annotation:1.1.0
7
帖子
0
勋章
43
Y币
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

我引入的是这个类库,但之前编译从来没报错啊,这次怎么都编译不过去
现在可以了,重新编译一下
您需要登录后才可以回帖 登录

本版积分规则