How to avoid stripping for native code symbols for android app

前端 未结 2 1254
傲寒
傲寒 2020-12-28 14:14

I\'m getting sigsegv 11 in native code and i need to avoid stripping to understand what\'s wrong. The app uses library (aar) and i was able to avoid stripping f

相关标签:
2条回答
  • 2020-12-28 14:44

    There's an undocumented method 'doNotStrip' in packagingOptions, just add following lines in your build.gradle

    packagingOptions{
        doNotStrip "*/armeabi/*.so"
        doNotStrip "*/armeabi-v7a/*.so"
        doNotStrip "*/x86/*.so"
    }
    
    0 讨论(0)
  • 2020-12-28 15:07

    Fortunately you don't actually need to keep the symbols in the app. The NDK ships a tool called ndk-stack (it's in the root of the NDK) that can symbolize a stack trace for you: https://developer.android.com/ndk/guides/ndk-stack.html

    0 讨论(0)
提交回复
热议问题