Android Studio: Error Invalid file name, directory name or volume name.

I am using Windows 7 64bit and switched to the latest android studio and I am getting this error:

Error: There was a problem configuring project ': myproject'.
Failed to normalize path for file 'C: \ Users \ me \ Apps \ Android \ android \ myproject \ myproject: facebook-sdk \ bolts-android-1.1.2.jar'.

Error The file name, directory name, or volume label syntax is incorrect

This happened for
Android Studio versions : 1.0.1
Gradle: 2.2.1

+3


source to share


3 answers


This problem occurs if the syntax is inconsistent. Below is the script,
I made one mistake in my build.gradle file

    compile files(':libs/lib_ivy_android')

      

and I changed later as below

    compile files(':libs/lib_ivy_android.jar')

      



then also i got the same error i did R&D about this then finally i changed as below and then i wasnt wrong

    compile files('libs/lib_ivy_android.jar')

      

So this might be the solution for you.

+4


source


I had the same error because I am adding the same library both in .jar and depending on

Like this



enter image description here

Comment one .... Happy coding:]

+2


source


@ScottBarta and @KenWhite solved it in the comments ( :

not valid in filename)

The problem is that the directory name is not valid as @Scott specified. Windows does not allow colons ( :

) in the file name as this is the drive separator. C:

, is myproject:facebook-sdk

not because it is myproject:

not a valid drive letter.

Other invalid letters

< (less than)
> (greater than)
: (colon)
" (double quote)
/ (forward slash)
\ (backslash)
| (vertical bar or pipe)
? (question mark)
* (asterisk)

      

As the OP said, just remove it:

removed it and now it started working for me.

+1


source







All Articles