Android Studio LibGDX Gradle 同步错误
Android Studio LibGDX Gradle Sync Error
在尝试 运行 gradle 同步后,我收到此错误。我不确定这是否与 libgdx 有某种关系,还是只是一个 Gradle 问题。
Configuration 'compile' is obsolete and has been replaced with
'implementation' and 'api'. It will be removed at the end of 2018. For
more information see:
http://d.android.com/r/tools/update-dependency-configurations.html
The minSdk version should not be declared in the android manifest
file. You can move the version from the manifest to the defaultConfig
in the build.gradle file.
The targetSdk version should not be declared in the android manifest
file. You can move the version from the manifest to the defaultConfig
in the build.gradle file.
Gradle 3.4 引入了新的 Java Library plugin configurations,允许您控制是否将依赖项发布到使用该库的项目的编译和运行时类路径。
implementation
和 api
只能与 Android Plugin for Gradle 3.0.0
或更高版本一起使用。
Android 插件 3.0.0 需要 Gradle 4.1 或更高版本。
Gradle 4.x 在 LibGDX 中尚不支持,但有一个 issue 支持。
所以目前你不能将implementation
或api
与libGDX一起使用
所以坚持使用过时的 api 并使用 compile
.
在尝试 运行 gradle 同步后,我收到此错误。我不确定这是否与 libgdx 有某种关系,还是只是一个 Gradle 问题。
Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'. It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
The minSdk version should not be declared in the android manifest file. You can move the version from the manifest to the defaultConfig in the build.gradle file.
The targetSdk version should not be declared in the android manifest file. You can move the version from the manifest to the defaultConfig in the build.gradle file.
Gradle 3.4 引入了新的 Java Library plugin configurations,允许您控制是否将依赖项发布到使用该库的项目的编译和运行时类路径。
implementation
和api
只能与Android Plugin for Gradle 3.0.0
或更高版本一起使用。Android 插件 3.0.0 需要 Gradle 4.1 或更高版本。
Gradle 4.x 在 LibGDX 中尚不支持,但有一个 issue 支持。
所以目前你不能将implementation
或api
与libGDX一起使用
所以坚持使用过时的 api 并使用 compile
.