i have strange problem and i know it is was written before but all solutions not worked :(
Error:Execution failed for task ':app:transformNative_libsWithStripDebugSymbolForDebug'.
java.lang.NullPointerException (no error message)
it was debug before gradle 2.2
i have a week without any solution :(
----project lvl---- ----build.gradle----
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle-experimental:0.8.1'
classpath 'com.android.tools.build:gradle:2.2.1'
classpath 'com.google.gms:google-services:3.0.0'
}
}
allprojects {
repositories {
jcenter()
}
}
----app lvl----
apply plugin: 'com.android.model.application'
model {
android {
compileSdkVersion = 24
buildToolsVersion = '24.0.3'
defaultConfig {
applicationId = 'com.czar.tunnel.cave'
minSdkVersion.apiLevel = 12
targetSdkVersion.apiLevel = 24
versionCode = 7
versionName = '7.0'
}
ndk {
platformVersion = 12
moduleName = 'game'
toolchain = 'clang'
stl = 'gnustl_static' // recommending gnustl_static/gnustl_shared for android
cppFlags.addAll(['-std=c++11', '-Wall', // glm could not take -Wall -Werror
'-D GLM_FORCE_SIZE_T_LENGTH', '-D GLM_FORCE_RADIANS',
'-I' + file('src/main/jni'),
'-I' + file('src/main/jni/data')])
ldLibs.addAll(['android', 'EGL', 'GLESv2', 'OpenSLES', 'log'])
}
sources {
main {
jni {
dependencies {
project ':nativeactivity' linkage 'static'
}
}
}
}
buildTypes {
release {
minifyEnabled = false
}
}
}
android.lintOptions {
abortOnError = false
}
}
dependencies {
compile 'com.skyfishjy.ripplebackground:library:1.0.1'
compile 'pl.droidsonroids.gif:android-gif-drawable:1.1.1'
compile 'com.google.android.gms:play-services-ads:9.4.0'
compile 'com.google.firebase:firebase-core:9.4.0'
compile 'com.google.firebase:firebase-messaging:9.4.0'
}
apply plugin: 'com.google.gms.google-services'
----module lvl---- ----build.gradle----
----native activity gradle----
apply plugin: 'com.android.model.library'
def ndkDir = System.getenv("ANDROID_NDK_HOME")
def propertiesFile = project.rootProject.file('local.properties')
if (propertiesFile.exists()) {
Properties properties = new Properties()
properties.load(propertiesFile.newDataInputStream())
ndkDir = properties.getProperty('ndk.dir')
}
model {
android {
compileSdkVersion = 24
buildToolsVersion = '24.0.3'
defaultConfig.with {
minSdkVersion.apiLevel = 12
targetSdkVersion.apiLevel = 24
versionCode = 1
versionName = '0.0.1'
}
ndk {
moduleName = 'native-activity'
ldLibs.addAll(['log', 'android'])
ldFlags.add('-c')
}
sources {
main {
jni {
source {
srcDir "${ndkDir}/sources/android/native_app_glue"
}
exportedHeaders {
srcDir "${ndkDir}/sources/android/native_app_glue"
}
}
}
}
}
}
dependencies {
compile 'com.google.android.gms:play-services-ads-lite:9.4.0'
}
Try to change classpath 'com.android.tools.build:gradle:2.2.1' to classpath 'com.android.tools.build:gradle:1.5.0'
it's work for me..