Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Operation Succeeded" in Android Studio 4.1, with no action

Have anyone faced this issue with the new Android Studio 4.1. When I run the app to the simulator, everything works and builds. Later it also shows a message

enter image description here

In the run, the error message is

Unable to determine application id: com.android.tools.idea.run.ApkProvisionException: Error loading build artifacts from: LOCATION/build/outputs/apk/act/debug/output-metadata.json 
like image 589
sadat Avatar asked Oct 22 '20 01:10

sadat


2 Answers

I see this when switching branches from one that uses Android Gradle Plugin 4.0.1 and Gradle 6.1.1 to one that uses Android Gradle Plugin 4.1.1 and Gradle 6.5.

The workaround here is to manually run File > Sync Project with Gradle Files.

like image 121
CommonsWare Avatar answered Oct 09 '22 12:10

CommonsWare


I just figured out that, if you upgrade your gradle in one branch and change your branch to something which had the old gradle, you may face this issue.

I just updated the gradle and it fixed the issue.For me I change from

classpath 'com.android.tools.build:gradle:4.0.1' 

to

classpath 'com.android.tools.build:gradle:4.1.2' 
like image 32
sadat Avatar answered Oct 09 '22 13:10

sadat