Gradle 2.2.0 execution failed: SymbolForDebug

2019-03-23 18:00发布

After upgrading gradle of my project (and library attached to it) from 2.1.3 -> 2.2.0 it doesn't build anymore and it says:

Error:Execution failed for task ':app:transformNative_libsWithStripDebugSymbolForDebug'. java.lang.NullPointerException (no error message)

Anyone have a clue on why this is?

4条回答
混吃等死
2楼-- · 2019-03-23 18:44

You need to change the following lines in build.gradle file:

    android {
        // SDK 24 worked for me - make sure you have the latest and update it accordingly.
        compileSdkVersion 24
        buildToolsVersion "24.0.2"
    ...
    }
查看更多
Deceive 欺骗
3楼-- · 2019-03-23 18:51

Maybe you can update the ndk version. I update the ndk version from r10 to r13,and finally it worked.

查看更多
走好不送
4楼-- · 2019-03-23 19:02

I found answer here: https://stackoverflow.com/a/40117446/1088975

The point is to set both targetSdkVersion and compileSdkVersion to 22"

查看更多
戒情不戒烟
5楼-- · 2019-03-23 19:03

You might want to check if the location of your NDK folder has any white space in it...if it has you can move your ndk folder to the c:\ drive and rebuild

Also, check the gradle versiom of your app and either upgrade or download later version, because some ndk versions do not support later gradle version

查看更多
登录 后发表回答