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
source to share
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.
source to share
@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:
, ismyproject:facebook-sdk
not because it ismyproject:
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.
source to share