小编Mon*_*ica的帖子

将 JAVA.VERSION 更改为 11 后,我得到“Android Gradle 插件需要 Java 11 才能运行。您当前正在使用 Java 1.8”

我已经改变sourceCompatibility并且targetCompatibility正在JavaVersion.VERSION_11构建。所有模块的 gradle 文件。在我的电脑中,我有 JDK 11,JAVA_HOME 和路径都可以,在项目中:

在此输入图像描述

但我仍然得到 Failed to apply plugin 'com.android.internal.application'. Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8. You can try some of the following options: changing the IDE settings. changing the JAVA_HOME environment variable. changing org.gradle.java.home ingradle.properties`

我的 gradle.properties: org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=1024m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 org.gradle.parallel=true android.useAndroidX=true android.enableJetifier=true

android gradle android-gradle-plugin

6
推荐指数
2
解决办法
1万
查看次数

Bitrise:无法解析配置“:classpath”的所有工件无法解析com.google.gms:google-services:4.2.0

更新后com.android.tools.build:gradlecom.google.gms:google-services我可以在本地构建项目(命令gradlew build --scan),但Bitrise我收到“构建失败”和消息:

FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'git'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not resolve com.android.tools.build:gradle:4.1.0.
Required by:
project :
> Could not resolve com.android.tools.build:gradle:4.1.0.
> Could not get resource 
'http://dl.bintray.com/populov/maven/com/android/tools/build/gradle/4.1.0/gradle-4.1.0.pom'.
> Could not GET 
'http://dl.bintray.com/populov/maven/com/android/tools/build/gradle/4.1.0/gradle-4.1.0.pom'. 
Received status code 502 from server: Bad Gateway
> Could not resolve com.google.gms:google-services:4.2.0.
Required by:
project :
> …
Run Code Online (Sandbox Code Playgroud)

android gradle bitrise

1
推荐指数
1
解决办法
1715
查看次数

标签 统计

android ×2

gradle ×2

android-gradle-plugin ×1

bitrise ×1