错误记录Android Studio 编译报错 ( Deprecated Gradle features were used in this build, making it incompat )

Posted 韩曙亮

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了错误记录Android Studio 编译报错 ( Deprecated Gradle features were used in this build, making it incompat )相关的知识,希望对你有一定的参考价值。

文章目录





一、报错信息



使用 android Studio 编译比较老的 Android 项目时 , 报如下错误 :

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> A problem occurred configuring project ':liveRtmpPushSDK'.
   > Failed to notify project evaluation listener.
      > org.gradle.api.tasks.compile.CompileOptions.setBootClasspath(Ljava/lang/String;)V

* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Exception is:
org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ':app'.
	at org.gradle.configuration.project.LifecycleProjectEvaluator.wrapException(LifecycleProjectEvaluator.java:75)
	//...
	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)


* Get more help at https://help.gradle.org

BUILD FAILED in 8s

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.7.1/userguide/command_line_interface.html#sec:command_line_warnings





二、解决方案



选择 " 菜单栏 / File / Project Structure " 选项 ,

该 Android Gradle 插件 与 Gradle 版本 太低 ;

设置一个新的 Android Gradle 插件版本 和 Gradle 版本 ;

以上是关于错误记录Android Studio 编译报错 ( Deprecated Gradle features were used in this build, making it incompat )的主要内容,如果未能解决你的问题,请参考以下文章

错误记录Android Studio 编译报错 ( Could not determine java version from ‘11.0.8‘. | Android Studio 降级 )(代码片段

错误记录Android Studio 编译报错 ( Could not determine java version from ‘11.0.8‘. | Android Studio 降级 )(代码片段

错误记录Android Studio 编译时 Kotlin 代码编译报错 ( 升级支持库时处理 @NonNull 参数 )

错误记录Android Studio 编译报错 ( Invalid main APK outputs : EarlySyncBuildOutput )

错误记录Android Studio 编译报错 ( Invalid Gradle JDK configuration found )

错误记录Android Studio 编译报错 ( VirtualApp 编译 NDK 报错 | Error:A problem occurred configuring project ‘: )(代