Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not normalize path for file 'E:\WorkSpace\mapdemo\app\build\intermediates\mockable-Google Inc.:Google APIs:21.jar'

I'm trying to run this app but it gives me error and I don't understand meaning of this error?

I have added google play service library also in build.gradle file:

apply plugin: 'com.android.application'

android {
compileSdkVersion 'Google Inc.:Google APIs:21'
buildToolsVersion "21.1.2"

defaultConfig {
    applicationId "act.com.mapdemo"
    minSdkVersion 19
    targetSdkVersion 21
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.google.android.gms:play-services:6.5.87'
}

my xml file:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >

<fragment
    android:id="@+id/map"
    android:name="com.google.android.gms.maps.MapFragment"
    android:layout_width="match_parent"
    android:layout_height="match_parent"/>

</RelativeLayout>

When I'm running it gives me error:

Gradle 'mapdemo' project refresh failed

Error:Could not normalize path for file 'E:\WorkSpace\mapdemo\app\build\intermediates\mockable-Google Inc.:Google APIs:21.jar'.
The filename, directory name, or volume label syntax is incorrect
like image 610
Mansi Bhatt Avatar asked Feb 21 '15 12:02

Mansi Bhatt


1 Answers

Change your Android Gradle plugin version to:

dependencies {
    classpath 'com.android.tools.build:gradle:1.1.2'
}

This was a bug in earlier versions of the plugin that didn't properly escape illegal characters on Windows, and its fixed in v1.1.2:

https://code.google.com/p/android/issues/detail?id=148912

like image 175
Sean Barbeau Avatar answered Sep 27 '22 23:09

Sean Barbeau