2016-01-18 50 views
1

我創建了一個新項目,並沒有修改任何文件。:mobile:compileDebugJavaWithJavac FAILED

我剛剛在項目創建後運行移動模塊。

錯誤消息是: 錯誤:執行任務':mobile:compileDebugJavaWithJavac'失敗。

java.io.FileNotFoundException: C:\Users\Administrator\AndroidStudioProjects\InTheLeft\mobile\build\intermediates\exploded-aar\com.google.android.gms\play-services\8.4.0\jars\classes.jar (can't find this path)

存在的build.gradle:

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 23 
    buildToolsVersion "23.0.2" 

    defaultConfig { 
     applicationId "ooo.zuo.intheleft" 
     minSdkVersion 14 
     targetSdkVersion 23 
     versionCode 1 
     versionName "1.0" 
    } 
    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 
} 

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    wearApp project(':wear') 
    testCompile 'junit:junit:4.12' 
    compile 'com.android.support:appcompat-v7:23.1.1' 
    compile 'com.google.android.gms:play-services:8.4.0' 
} 
+0

好心檢查SDK,如果你有最新的額外可用,如果不更新它 –

回答

1

起初升級SDK管理器

java.io.FileNotFoundException: C:\Users\Administrator\AndroidStudioProjects\InTheLeft\mobile\build\intermediates\exploded-aar\com.google.android.gms\play-services\8.4.0\jars\classes.jar (can't find this path)

在嘗試打開由指定路徑名錶示的文件失敗期間拋出此異常。

什麼是你的classpath ??

您可以使用

compile 'com.google.android.gms:play-services:8.3.0' 

& 使用此

classpath 'com.android.tools.build:gradle:2.0.0-alpha2'

然後清潔重建項目。

+0

請讓我反饋。 –

+0

我的類路徑是C:\ classpath。我將8.4.0更改爲8.30,但它不起作用 – OstAlex

+0

發佈您的gradle類路徑 –