Playstore error: “ App Bundle contains native code, and you’ve not uploaded debug symbols ”.
If you get this error when uploading your app to the Google Play Console, you need to add a debug symbol to your app.
To add debug symbols to the following tutorial, you must use the Android Gradle Plugin version 4.1 and later.
1. Install NDK and CMake in Android Studio
- In the project that opens, click on “ Tools > SDK Manager ”.
- Click the “SDK Tools” tab.
- Select and tick NDK (Side by side) and CMake.
- Click the “OK” button, a dialog box will tell you how much space the NDK package is using on the disk.
- Then click “OK”.
- When the installation is complete, click the “Finish” button.
- Your project automatically syncs the build files and performs the build. Resolve any errors that occur.
Other Interesting Articles
2. Check NDK Version
- Go back to “ Tools > SDK Manager > SDK Tools ”.
- Check “ Show Package Details ” at the bottom right of the window.
- Then look at the installed version.
3. Generate debug symbol in build.gradle
To add debug symbols to your application, add the following code to the “ app > build.gradle ” file.
android { .................. ndkVersion "24.0.8215888" //ndk version you are using buildTypes { release { .................. ndk { debugSymbolLevel 'FULL' //debugSymbolLevel 'SYMBOL_TABLE ' } } } .................. }
If the resulting file is too large, replace debugSymbolLevel ‘FULL’ with debugSymbolLevel ‘SYMBOL_TABLE.
The debug symbol file has a maximum limit of 300 MB.
4. Build Bundle/APK
Then in your project in Android Studio, click “ Build > Generate Signed Bundle/APK… ”.
If you choose to compile your application in the format:
- APK, debug symbol files will be created at “app\build\outputs\native-debug-symbols\release\ native-debug-symbols.zip ”. Upload the file to the Google Play Console.
- Android app Bundle, a debug symbol file will be created inside the “ app-release.aab ” file. You no longer need to upload a separate debug symbol file.