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

AndroidAndroid Studio

Android Problem Overview


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

Android Solutions


Solution 1 - Android

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.

Solution 2 - Android

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'

Solution 3 - Android

Changing o updating your gradle version is not the real solution.

classpath 'com.android.tools.build:gradle:5.?.?'

if you change the value this is provoking a new project sync with the files of your project.

so the real solution is to synchronize the project with the Gradle files:

File > Sync Project with Gradle Files.

Solution 4 - Android

This is an issue of Gradle 4.1.1, Will work properly in Gradle 4.1.0, Please use :

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

Solution 5 - Android

I met with this issue when I manually copied some files of one project into another(they were related to gradle).

So, In my case, the main issue was with the settings.gradle file. There is this line in the file:

rootProject.name = "Your App Name"

Make sure it is exactly similar to the home folder of your project.

Solution 6 - Android

A possibility why This problem happens because of the run configuration. go to run configurations, within Before launch add Gradle-aware Make. It worked for me.

Solution 7 - Android

File/Invalidate Caches/Restart worked for me. Note: I already applied above mentioned solutions.

Solution 8 - Android

This fixed my issue. Go to

> Run > Edit Configurations > Android App > app

On General tab change Launch option to

> Default Activity

In my case it was selected

> Nothing

Solution 9 - Android

I'm using RedMi android device, seems all the MI android phone should has this issue.

I tried all but doesn't work. The solution is turn off Turn on MIUI optimization in Developer options.

Solution 10 - Android

The problem occurred to me on beta version of the android studio. I fixed it by upgrading it to the latest version and upgrade the gradle to the next highest version.

This problem occurred to me when I tried to run jetpack compose samples from github.

Solution 11 - Android

First Build->clean your project and then Build->Rebuild Project it will solve the problem

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionsadatView Question on Stackoverflow
Solution 1 - AndroidCommonsWareView Answer on Stackoverflow
Solution 2 - AndroidsadatView Answer on Stackoverflow
Solution 3 - AndroidJorgesysView Answer on Stackoverflow
Solution 4 - AndroidMital JoshiView Answer on Stackoverflow
Solution 5 - AndroidR. RohillaView Answer on Stackoverflow
Solution 6 - AndroidهيثمView Answer on Stackoverflow
Solution 7 - AndroidshabyView Answer on Stackoverflow
Solution 8 - AndroidmDonmezView Answer on Stackoverflow
Solution 9 - AndroidWilliam HuView Answer on Stackoverflow
Solution 10 - AndroidPatrick PrakashView Answer on Stackoverflow
Solution 11 - AndroidYazdan IlyasView Answer on Stackoverflow