![](https://downtips.com/wp-content/uploads/2024/02/android-studio-logo.png)
How Android Studio 3.1 “Run” compiling code
Admin
- 0
DownTips gives you the best solution How Android Studio 3.1 Run Compiling code.
Why Android Studio 3.1 “Run” not compiling code?
When you try to install an app, there are two possibilities:
- Install existing APK from build folder when I run the
app
- Install APK after performing
clean build
For existing APK in the build folder, the app just works fine. But when you clean the project using Build
-> Clean Project
, and then try to run the app
(i.e. install the app to your emulator or physical device), it shows the error. Here are the best solution with step by step:
Firstly,
- Edit your app configuration as below.
![](https://downtips.com/wp-content/uploads/2024/02/41j4U.png)
2. Here you can see your app configuration as below.
![](https://downtips.com/wp-content/uploads/2024/02/SAe9w.png)
3.Here is missing Gradle-aware make attribute in before launch configuration. You can see here.
![](https://downtips.com/wp-content/uploads/2024/02/dcnCO.png)
4. Please add this Gradle-aware Make attribute through this way. Click on + icon and select Gradle-aware Make as seen in this screen.
![](https://downtips.com/wp-content/uploads/2024/02/Ew2T9.png)
5. You can add this without writing any task just press OK button and task will be added and now it should look like this. Now apply changes and run your application.
![](https://downtips.com/wp-content/uploads/2024/02/GcHRG.png)
It will solve this old apk installing issue on clean build in new Android Studio 3.1 issue.
Note : This issue is resolved in new Android Studio 3.1.1 Stable release.
We can also confirm by Android Studio.