Override Java version when building a Cordova project with gradle

后端 未结 3 1009
一个人的身影
一个人的身影 2020-12-16 13:43

I am trying to build a Cordova project using gradle as a build tool. In the Cordova project I have my own plugin that requires Java 1.7.

In the build.gradle that com

3条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-16 14:41

    The next rows have been found and updated.

    compileOptions {
            sourceCompatibility JavaVersion.VERSION_1_6
            targetCompatibility JavaVersion.VERSION_1_6
        } 
    

    to

    compileOptions {
            sourceCompatibility JavaVersion.VERSION_1_7
            targetCompatibility JavaVersion.VERSION_1_7
        }
    

    The main point is changing build.gradle file that are located in the next folder \platforms\android\ But keep in mind there are also presented other build.gradle files with other paths.

提交回复
热议问题