Kivy Buildozer: .so lib files missing debug symbols

徘徊边缘 提交于 2019-12-06 11:04:53

Attach native debug symbols

If your APK includes native libraries (.so files) that do not include debug symbols, the IDE shows you a warning in the Messages window. You cannot debug the APK’s native code or use breakpoints without attaching debuggable native libraries.

To attach debuggable native libraries, proceed as follows:

  1. If you have not already done so, make sure to download the NDK and tools.
  2. Under the cpp directory in the Project window (visible only if you have selected the Android view, as shown in below figure), double-click a native library file that doesn't include debug symbols. The editor shows a table of all the ABIs your APK supports.
  3. Click Add at the top right corner of the editor window.
  4. Navigate to the directory that includes the debuggable native libraries you want to attach and click OK.

If the APK and debuggable native libraries were built using a different workstation, you need to also specify paths to local debug symbols by following these steps:

  1. Add local paths to missing debug symbols by editing the field under the Local Paths column in the Path Mappings section of the editor window, as shown in below figure. In most cases, you need only provide the path to a root folder, and Android Studio automatically inspects subdirectories to map additional sources. The IDE also automatically maps paths to a remote NDK to your local NDK download.
  2. Click Apply Changes in the Path Mappings section of the editor window.

You should now see the native source files in the Project window. Open those native files to add breakpoints and debug your app as you normally would. You can also remove the mappings by clicking Clear in the Path Mappings section of the editor window .

Known issue: When attaching debug symbols to an APK, both the APK and debuggable .sofiles must be built using the same workstation or build server.

Source

I think these symbols are stripped by python-for-android during the recipe part of the build process. It probably wouldn't be hard to prevent this (or ideally to add an option to disable it), but I don't think there is currently one.

If you post your error with the apk, we may be able to help debug it anyway, I don't usually see issues that need the debug symbols to resolve.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!