Ever since I have upgraded my Android Studio 3.0.1 to 3.1 I am not able to run the project.
Executing task 'assemble'..
FAILURE: Build failed with an exception.
* What went wrong:
The specified project directory '' does not exist.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED in 0s
The specified project directory '' does not exist.
15:52:35: Task execution finished 'assemble'.
If you are using IntelliJ with Gradle, you may need to unlink a non-existent module in the Gradle tab.
The issue might also be caused by an empty 'Gradle project:' field under:
'Run'
-> 'Edit Configurations...'
-> 'Gradle'
-> 'NAME OF YOUR CONFIGURATION'
-> 'Configuration'
-> 'Gradle project:'
Filling out this field by selecting the root directory of my application (an clicking on 'Apply') resolved the issue for me.
Delete .idea and .gradle folders and try to re-import the project. I had refactored my project name and I ran into the issue and deleting .idea and .gradle folders and re importing worked as it clears the meta data of project configuration for intellij or android studio.
Navigate to "File" and select "Invalidate Caches and Restart" from the drop down. After Android Studio restarts, your project should run.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With