Home > Software engineering >  Not able to run Android app || 'Gradle-aware make' is missing in app configuaration
Not able to run Android app || 'Gradle-aware make' is missing in app configuaration

Time:06-26

I have cloned a private repo that I can't share. that project is built successfully and I can create debug/release apk as well. But I am not able to run it from the run button in android studio.

When I click on the run button, It is not launching in mobile/emulator. Immediately, It says 'launch successfully' Even if it is not starting Gradle run.

So I compared many settings with a sample app that is running as expected, So I found one difference which is in the app configuration(select the app [near run icon] -> Edit configuration).

That 'Gradle-aware Make' is not there in the 'Before launch' section in the 'General' tab of app configuration. check the screenshot below:

Missing Gradle-aware Make command

In the working sample, It is present and we can remove/add it again and again normally. Check the screenshot below:

Sample Gradle-aware Make command

So How to generate it, Can Someone please help me?

CodePudding user response:

Many thanks to this

Steps to reproduce Gradle-aware Make in before launch or pre launch:

  1. Create a new Android JUnit run config for the ExampleUnitTest test class:

    • Run -> Edit Configurations.

    • Click the " " button in top-left of the window.

    • Choose "Android JUnit" or "JUnit".

    • Use classpath(-cp) of module "PROJECT_NAME.app.unitTest".

    • Class ".ExampleUnitTest".

  2. Run the newly-created run config

  3. Quit the IDE

  4. Re-launch the IDE, allow Gradle sync to complete

  5. Clean the project (Build -> Clean Project)

  6. Run the ExampleUnitTest run config again

For me, Above steps are generating the Gradle-aware Make option in before launch section.

Thanks to the actual owner.

  • Related