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:
In the working sample, It is present and we can remove/add it again and again normally. Check the screenshot below:
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:
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".
Run the newly-created run config
Quit the IDE
Re-launch the IDE, allow Gradle sync to complete
Clean the project (Build -> Clean Project)
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.