Question

I'm trying to build my first android app using Android Studio. Unfortunately, every time I open my project, try to run it or gradle assemble it I get the following error :

Gradle 'MalipoBatteryAlarm' project refresh failed:
C:\Users\wickedQuasar\.gradle\daemon\1.10\daemon-6128.out.log
(The filename, directory name, or volume label syntax is incorrect)

What file or directory is causing the problem is unclear. I used to overcome this error by rebuilding my project, changing access rights to username.gradle folder or switching b/w using default and customizable gradle wrappers. From last two days nothing seems to fix it and I'm totally stuck. I've also tried this : Gradle: The filename, directory name, or volume label syntax is incorrect but it didn't fix it.

I've wasted tens of productive hours of my life trying to fix it so any help would be appreciated. From my research I found that this error is usually caused by "unnacceptable characters" in file names. i can't seem to find the cause in my case though.

I'm using a 32bit win 7 machine with Android Studio 0.5.5. My java env variables are set properly.

Update : The command

gradlew build --stacktrace

returns BUILD SUCCESSFUL, but not in the IDE...

Gradle build file for project root :

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.9.+'
    }
}

allprojects {
    repositories {
        mavenCentral()
    }
}

Module gradle build file :

apply plugin: 'android'

android {
    compileSdkVersion 19
    buildToolsVersion "19.0.3"

    defaultConfig {
        minSdkVersion 8
        targetSdkVersion 19
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}

dependencies {
    compile 'com.android.support:appcompat-v7:19.1.0'
    compile fileTree(dir: 'libs', include: ['*.jar'])
}
Was it helpful?

Solution

Workaround : Switched to commandline now. Assembling using gradle commandline and installing/monitoring using adb and ddms. Everything is dramatically fast now and works like a charm on a dual monitor setup. IDE is still showing the error though...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top