“Signed in debug mode” error on Google Play: how to fix it
Why Google Play rejects a bundle signed in debug mode or a debuggable APK, and how to set up release signing in Android Studio, Flutter, React Native, Expo and Unity.
You upload a build and the Play Console refuses it: “You uploaded an APK or Android App Bundle that was signed in debug mode. You need to sign your APK or Android App Bundle in release mode.” A related error says: “You uploaded a debuggable APK. For security reasons you need to disable debugging before it can be published in Google Play.” Both mean the file was built for testing. It is either signed with the automatic debug key or marked as debuggable.
Why it happens
Android Studio and the SDK tools create a debug keystore automatically (in ~/.android/debug.keystore) so you can run builds on a device. That certificate is insecure by design, and Google Play doesn’t accept apps signed with it. The usual ways it ends up in an upload:
- Your framework template signs release with the debug key. Flutter’s Android template has a TODO in the release build type and uses signingConfigs.debug. React Native and Expo’s prebuild template do the same, with a comment saying you need your own keystore in production.
- You uploaded the debug output. app-debug.apk or a bundle from build/outputs/bundle/debug was picked up instead of the release one.
- Release signing is wired up but not loading. If key.properties or the Gradle properties are missing (for example on a CI machine), the signing block can end up empty and the build falls back to another config.
- Debugging is switched on. debuggable true in the release build type, or android:debuggable="true" in the manifest, gives the “debuggable APK” variant of the error.
- Unity has no custom keystore. With Custom Keystore turned off, Unity signs with a debug keystore, and Unity’s docs say app stores decline those builds.
How to fix it
- Find the right key. If the app is already on Google Play, use the upload key you used before. Signing with a new key gives a different error (wrong signing key). For a brand-new app with Play App Signing, the key you sign your first release with becomes your upload key.
- If you have no key yet, create one: in Android Studio use Build → Generate Signed Bundle/APK → Create new, or run keytool -genkey -v -keystore ~/upload-keystore.jks -keyalg RSA -keysize 2048 -validity 10000 -alias upload. Back it up and keep the passwords safe.
- Keep the passwords out of your build files: put them in a properties file (key.properties or keystore.properties) that is not committed, and load it in app/build.gradle or build.gradle.kts.
- Add a release signingConfig that reads those values, and set signingConfig to it in buildTypes → release. Delete or replace the template line that points release at signingConfigs.debug.
- Make sure release isn’t debuggable: no debuggable true in the release build type and no android:debuggable in the manifest.
- Build the release variant (see the table), then check it. The Gradle signingReport task shows which keystore each variant uses. Upload the file from the release output folder.
| Project type | Where release signing is set | Release build |
|---|---|---|
| Android Studio | Project Structure → Modules → Signing, then Build Types → release → Signing Config. Or signingConfigs in app/build.gradle(.kts) | Build → Generate Signed Bundle/APK, or ./gradlew bundleRelease |
| Flutter | android/key.properties plus signingConfigs.release in android/app/build.gradle(.kts). Replace signingConfigs.debug in the release block | flutter build appbundle (run flutter clean if signing seems stale) |
| React Native (bare) | MYAPP_UPLOAD_* values in ~/.gradle/gradle.properties or android/gradle.properties, and signingConfigs.release in android/app/build.gradle | npx react-native build-android --mode=release |
| Expo | EAS Build signs with the keystore stored for your app. For local builds after prebuild, edit android/app/build.gradle like React Native | eas build --platform android |
| Unity | Player Settings → Publishing Settings → enable Custom Keystore and pick your keystore and alias | Build with Build App Bundle (Google Play) enabled |
Questions people ask
Why does Flutter sign my release build with the debug key?
The default Android template does it so flutter run --release works out of the box. It has a TODO telling you to add your own signing config. Until you do, every release build is signed with the debug key.
Can I use the debug keystore as my upload key?
No. Google Play does not accept apps signed with the debug certificate. Create a separate upload key.
What does “debuggable APK” mean?
The build has debugging turned on, usually from debuggable true in the build type or android:debuggable in the manifest. Remove it from the release build and rebuild.
I fixed signing and now get a wrong key error. Why?
The app on Google Play expects the upload key you used before. Sign with that key, or request an upload key reset if you lost it.
Sources
Check your own name
Domains, both app stores, bundle IDs and every live site using the name, in under a minute.
Check a name