java.lang.NullPointerException (no error message) APK building

前端 未结 6 1571
隐瞒了意图╮
隐瞒了意图╮ 2021-02-19 08:44
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        maven {
            url \"h         


        
6条回答
  •  無奈伤痛
    2021-02-19 09:08

    I had the same issue after adding:

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    

    It was because my default java version was 10:

    $ java -version
    java version "10.0.1" 2018-04-17
    

    After changing to 1.8 (with sudo update-alternatives --config java) issue was fixed.

提交回复
热议问题