Skip to content Skip to sidebar Skip to footer

Android Studio Uploads Sterile Apk To Device When Gradle Has Custom Logic Changing Apk Names

While using Android Studio I encountered the following error: The date of the APK is 2 days older than the current one (Gradle is used to append the build date to APK name). I've

Solution 1:

It is a problem with sync between Gradle and Android Studio. Press Gradle Sync icon (it is icon between Project Structure and AVD Manager) and it will solve the issue.

(In comments you asked for explanation - I found this answer few weeks ago, when I had also issue with this[but now I cannot find this page]. If I remember correctly was information, that during Sync Gradle is informing AS about different information including info about apk path. In your case [and mine in past] path is changing every day, as we have date in name of apk and due to this we have to make Sync)

Solution 2:

If you want a workaround for this you can check out my answer on this post.

Basically, you wold only rename the APK when doing a command line build, such as from a CI Server. While doing normal development Android Studio works as usual.

Post a Comment for "Android Studio Uploads Sterile Apk To Device When Gradle Has Custom Logic Changing Apk Names"