0

当我尝试打开一个电容器项目 (我使用它来创建启动画面:https ://www.joshmorony.com/creating-a-dynamic-universal-splash-screen-for-capacitor-android/ )时,
我面临 Gradle 错误:

错误:Gradle 4.10.1 需要 Java 7 或更高版本才能运行。您当前使用的是 Java 6。

所以我尝试下载许多 java jdk 版本但没有运气

echo $JAVA_HOME returns: /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home

并且 SDK(项目结构 -> SDK 位置)设置为:

/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home

之后我重新启动了很多次,但没有运气......我需要帮助!

构建.gradle


// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.1.1'
        classpath 'com.google.gms:google-services:3.2.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

android studio gradle 错误

4

0 回答 0