错误记录Android Studio 编译报错 ( Could not determine java version from ‘11.0.8‘. | 仅做参考 | 没有解决实际问题 )

Posted 韩曙亮

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了错误记录Android Studio 编译报错 ( Could not determine java version from ‘11.0.8‘. | 仅做参考 | 没有解决实际问题 )相关的知识,希望对你有一定的参考价值。





一、报错信息



编译 VirtualApp 报如下错误 :

Could not determine java version from '11.0.8'.

The project uses Gradle version which is incompatible with Studio running on Java 10 or newer.
See details at https://github.com/gradle/gradle/issues/8431
Possible solution:
 - Upgrade Gradle wrapper to 4.8.1 version and re-import the project





二、解决方案



降低 Java 版本 , 或者提升 Gradle 版本 , 这里选择提升 Gradle 版本到 4.8.1 4.8.1 4.8.1 版本 ;

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\\://services.gradle.org/distributions/gradle-4.8.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

设置完毕后重新编译即可 ;

21:53:41: Executing task 'wrapper'...

Download https://services.gradle.org/distributions/gradle-4.8.1-bin.zip finished, took 3 s 347 ms (75.89 MB)
Executing tasks: [wrapper] in project Y:\\002_WorkSpace\\001_AS\\VA_Original\\VirtualApp-master\\VirtualApp

Starting Gradle Daemon...
Gradle Daemon started in 4 s 49 ms

注意 Gradle 与 Gradle 插件之间的匹配 ;

以上是关于错误记录Android Studio 编译报错 ( Could not determine java version from ‘11.0.8‘. | 仅做参考 | 没有解决实际问题 )的主要内容,如果未能解决你的问题,请参考以下文章

错误记录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 ‘: )(代