What should I do if the application upload fails with, "Debuggable applications cannot be protected"?
This is likely caused by debuggable defined as true in the application gradle file. It must be set to false for the uploaded APK.
Only release build variants can be protected. Rebuild your application in release mode and upload again. For details how to change the build variant in Android studio, refer to the Android developers' guide Build and run your app.
You can verify the status of debuggable in your packaged app via the following steps:
Extract the manifest using
unzip -p {APK_NAME}.apk AndroidManifest.xml > AndroidManifest.xml
where {APK_NAME}.apk is the file name of the apk to be uploaded.
Check the debuggable setting in the extracted AndroidManifest.xml file.
Updated 3 months ago