com.android.tools.idea.run.ApkProvisionException: Couldn't get post build model

Viewed 1228

After downgrading from Gradle 6.1.1 to 7.2 and Android Gradle Build tools 7.1.0 to 4.0.1 (by switching branches in Git) I got the following exception in the Run console (tool window) of Android Studio Bumblebee 2021.1.1 (when trying to run the app on a device):

Unable to determine application id: com.android.tools.idea.run.ApkProvisionException: Couldn't get post build model. Module: My_App.app Variant: debug

The Grade build runs successfully but the app won't be installed in the device.

1 Answers

In Android Studio run File > Invalidate Caches ... and restart (you don't need to select the optional "Clear file system cache and Local History"). Just to be sure, also run Build > Clean Project.

Related