Gradle Build got failed

Viewed 40

I got error "java.lang.NullPointerException (no error message)" when build gradle. Here the error detail https://scans.gradle.com/s/elqrorxbkywzy/failure?expanded-stacktrace=WyIwLTEiXQ&focused-exception-line=0-1-0#1. Please help me i got stuck after try this,

  1. I'm already delete .gradle from root project
  2. Already upgrade Grade 6.5.1 to 6.6.1
  3. Already doing gradle clean before gradle build again

capture of error when gradle build

build.gradle

buildscript {
     ext.kotlin_plugin_version = '1.4.31'
     ext.kotlin_version = '1.7.0'
     ext.nav_version = '2.3.3'
     repositories {
         google()
         mavenCentral()
         maven {
           url "http://developer.huawei.com/repo/"
           allowInsecureProtocol = true
         }
     }
     dependencies {
           // NOTE: Do not place your application dependencies here; they belong
           // in the individual module build.gradle files
           classpath 'com.android.tools.build:gradle:4.1.3'
           classpath 'com.google.gms:google-services:4.3.10'
           classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
           classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
           classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1'
           // Add the dependency for the Performance Monitoring plugin
           classpath 'com.google.firebase:perf-plugin:1.4.0'
           classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_plugin_version"
           classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version"
      }
}

plugins { id "org.sonarqube" version "3.0" }

allprojects {
     repositories {
          google()
          mavenCentral()
          maven { url "https://plugins.gradle.org/m2/" }
          maven { url "https://jitpack.io" }
          maven {
             url "http://mobilesdk.useinsider.com/android"
             allowInsecureProtocol = true
          }
          maven {
             url "http://developer.huawei.com/repo/"
             allowInsecureProtocol = true
          }
      }
}

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

ext {
     compileSdkVersion = 31
     minSdkVersion = 24
     targetSdkVersion = 31
}

app/build.gradle

apply plugin: 'com.android.application'
apply plugin: 'com.google.firebase.crashlytics'
apply plugin: 'org.sonarqube'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: "androidx.navigation.safeargs"
apply plugin: 'com.google.firebase.firebase-perf'
apply plugin: 'kotlin-kapt'

sonarqube {
   properties {
       property "sonar.projectName", "Android Project"
       property "sonar.projectKey", "Android-Project"
       property "sonar.host.url", "http://localhost:9003"
       property "sonar.language", "java"
       property "sonar.login", "admin"
       property "sonar.password", "12345"
   }
}

tasks.withType(Test) {
   testLogging {
       events "started", "passed", "skipped", "failed"
       showStandardStreams = false
   }
}

def getProps(path) {
   Properties props = new Properties()
   props.load(new FileInputStream(file(path)))
   return props
}

def version = "6.15.0"
def buildVersion = version

android {
     ndkVersion '23.1.7779620'
     lintOptions {
          checkReleaseBuilds false
          abortOnError false
      }
     compileSdkVersion rootProject.ext.compileSdkVersion
     defaultConfig {
         minSdkVersion rootProject.ext.minSdkVersion
         targetSdkVersion rootProject.ext.targetSdkVersion
         versionCode 1000000000
         versionName buildVersion
         multiDexEnabled true
         testInstrumentationRunner 
         "androidx.test.runner.AndroidJUnitRunner"
         manifestPlaceholders = [auth0Domain: 
         "@string/com_auth0_domain", auth0Scheme: 
         "@string/com_auth0_scheme", partner: 
         "@string/insider_partnerName"]
         ndk {
           abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86_64'
         }

         resConfigs "en", "in"
         println("generating configuration from config allvariant properties")
         getProps('./config/allvariant.props').each { p ->
            if (p.key.startsWith("buildConfig")) {
                 buildConfigField 'String', p.key.replace("buildConfig.", ""), p.value
            } else if (p.key.startsWith("resValue")) {
                 resValue 'string', p.key.replace("resValue.", ""), p.value
            }
         }
         buildConfigField("String", "CONSUMER_KEY", "\"DNAIMMSP\"")
}
         flavorDimensions "pack"

         compileOptions {
             sourceCompatibility 1.8
             targetCompatibility 1.8
         }

         buildTypes {
           debug {
              buildConfigField "String", "HEADER_ORIGIN_VALUE", '"file://"'
              buildConfigField "String", "HEADER_CHANNELID_VALUE", '"UX"'
              buildConfigField 'boolean', 'ENABLE_CRASHLYTICS', 'true'
              buildConfigField "String", "HEADER_X_REQUESTED_VALUE", '"com.android.native"'
              buildConfigField 'String', "APP_VERSION", '"' + version + '"'
             resValue 'string', 'appVersion', buildVersion + '-DEBUG'
           }

             release {
               ndk.debugSymbolLevel = 'FULL'
               firebaseCrashlytics {
               nativeSymbolUploadEnabled true
             }
             shrinkResources true
             minifyEnabled true
             proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
             buildConfigField "String", "HEADER_ORIGIN_VALUE", '"file://"'
             buildConfigField "String", "HEADER_CHANNELID_VALUE", '"UX"'
             buildConfigField 'boolean', 'ENABLE_CRASHLYTICS', 'true'
             buildConfigField "String", "HEADER_X_REQUESTED_VALUE", '"com.android.native"'
             buildConfigField 'String', "APP_VERSION", '"' + version + '"'
             resValue 'string', 'appVersion', buildVersion
             }
        }

        externalNativeBuild {
            cmake.path = "src/main/c/CMakeLists.txt"
            cmake.version = "3.10.2.4988404"
        }

       testOptions {
            unitTests.returnDefaultValues = true
       }

       buildFeatures {
           viewBinding true
           dataBinding true
       }

       bundle.language.enableSplit = false
}

repositories {
    maven {
       url "https://delivery.v3d.fr/nexus/content/repositories/v3d_releases/"
       credentials {
           username 'telkomsel'
           password 'AGUXSdN43GOxwJbWJ2t9'
       }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    productionReleaseImplementation fileTree(dir: 'libs', include: ['*.jar'])
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
    androidTestImplementation "androidx.annotation:annotation:1.2.0"
    androidTestImplementation 'androidx.test:runner:1.3.0'
    androidTestImplementation 'androidx.test:rules:1.3.0'
    androidTestImplementation 'org.mockito:mockito-android:3.5.10'
    androidTestImplementation     "androidx.arch.core:coretesting:2.1.0"
}

gradle.properties

android.enableJetifier=true
android.useAndroidX=true
org.gradle.jvmargs=-Xms2048m -Xmx4096m -XX:+UseParallelGC
authToken=jp_8b181o9eakb3ejb6h07eg1isgr
# gradle.properties
systemProp.sonar.host.url=http://localhost:9003
systemProp.sonar.projectKey=android-native
# Token generated from an account with 'publish analysis' permission
systemProp.sonar.login=wefwefwe32425sdgedrgrdgredw342qqdeeq
# Native libs for aab
android.bundle.enableUncompressedNativeLibs=false
#android.useDeprecatedNdk=true
0 Answers
Related