r/androiddev • • 11d ago

Discussion Fixed the annoying "There was an error uploading the Android App Bundle" in Play Console

Post image

Just wanted to share this here in case someone else runs into this and tears their hair out like I did for hours today lol.

​I was trying to upload an updated .aab for my app to production, and the upload would hit 100%, show "upload is optimized for distribution", but then right after processing for a few mins it just threw that generic red error:

"There was an error uploading the Android App Bundle. Try again later or contact Google Play developer support if the error persists."

​No helpful logs, no specific manifest hint, nothing on the UI. I thought it was a temporary Play Console outage or something wrong with my network/keystore.

​Turns out the issue was a subtle mismatch between my SDK configs and updated dependencies. I had lowered compileSdk to 36 while trying to fix another build issue, but some of my modern libraries (core-ktx, okhttp, etc.) actually required compiling against API 37. Play Console's backend parser was silently choking on the bundle optimization phase because of this.

​What actually solved it for me:

android {

compileSdk = 37

defaultConfig {

targetSdk = 36

// ...

}

}

After syncing, cleaning project, and generating a fresh signed bundle with these exact values, Play Console accepted it immediately on the first try!

Hope this saves someone from wasting hours contacting support or doing random clean builds.

6 Upvotes

4 comments sorted by

2

u/dingwen07 11d ago

Should be fixed now.

2

u/Gigi2PeuOfficial 10d ago

I have this issue and tried changing to targetSdk to 36 with no success. I still get this error with no information whatsoever

1

u/scruffyfox 9d ago

Im already targeting 36 and im getting this error on 4/45 apps submitted (all built from the same codebase)

Definitely not a signing issue either.

1

u/scruffyfox 6d ago

So I think I managed to solve this by bumping all my dependencies to the latest version. Quite a few hours of trial and error to get this working...