Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The specified project directory ''" does not exist

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'.
like image 858
keser Avatar asked Apr 01 '18 12:04

keser


4 Answers

If you are using IntelliJ with Gradle, you may need to unlink a non-existent module in the Gradle tab.

like image 113
Rori Stumpf Avatar answered Sep 20 '22 17:09

Rori Stumpf


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.

enter image description here

like image 29
Ohumeronen Avatar answered Sep 19 '22 17:09

Ohumeronen


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.

like image 44
Khwaja Sanjari Avatar answered Sep 20 '22 17:09

Khwaja Sanjari


Navigate to "File" and select "Invalidate Caches and Restart" from the drop down. After Android Studio restarts, your project should run.

like image 34
Alex Wilson Avatar answered Sep 16 '22 17:09

Alex Wilson