2016-10-20 138 views
0

處理從bitbucket提取的項目。每當我嘗試構建gradle時,都會顯示以下錯誤。Gradle同步失敗:位於索引2的非法字符

Gradle sync failed: Illegal char at index 2: C\:\\Program Files (x86)\\Android\\android-sdk\analytics.settings 

該項目在從同一個存儲庫中提取的其他成員計算機上工作得非常好。 (其中之一實際上是將所有內容都上傳的人,在他的系統中工作顯然很好)。

現在我無法理解錯誤消息了。我不知道它提到的是什麼非法字符。

預先感謝您!

的build.gradle(項目)

apply plugin: 'com.android.application' 

android { 
compileSdkVersion 23 
buildToolsVersion "23.0.3" 

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

repositories { 
jcenter() 
maven { url "https://jitpack.io" } 
} 

dependencies { 
compile fileTree(dir: 'libs', include: ['*.jar']) 
testCompile 'junit:junit:4.12' 
compile 'com.android.support:appcompat-v7:23.4.0' 
compile 'com.android.support:design:23.4.0' 
compile 'com.android.support:cardview-v7:23.4.0' 
compile 'com.google.firebase:firebase-core:9.4.0' 
compile 'com.google.firebase:firebase-auth:9.4.0' 
compile 'com.google.firebase:firebase-messaging:9.4.0' 
compile 'com.google.firebase:firebase-config:9.4.0' 
compile 'com.google.firebase:firebase-invites:9.4.0' 
compile 'com.google.firebase:firebase-ads:9.4.0' 
compile 'com.google.android.gms:play-services-appindexing:9.4.0' 
compile 'com.google.android.gms:play-services-auth:9.4.0' 
compile 'com.vinaygaba:creditcardview:1.0.3' 
compile 'com.squareup.retrofit2:retrofit:2.0.0' 
compile 'com.squareup.retrofit2:converter-gson:2.0.0' 
compile 'com.squareup.picasso:picasso:2.5.2' 
compile 'com.squareup.okhttp3:logging-interceptor:3.2.0' 
} 

apply plugin: 'com.google.gms.google-services' 

編輯

我試圖刪除這個項目,並試圖從版本控制系統再次檢查。但是現在,由於Gradle無法建立,它甚至不會打開該項目。

checkout 我想這兩個選項,但它總是顯示下面的錯誤

error

編輯2 請注意,我的其他項目正在建設精細。所以問題必須與這個特定的項目

+0

嘗試刪除你的** build **目錄並重新編譯你的項目。 –

+0

你可以發佈完整的logcat –

+0

@錢先生沒有工作 – pblead26

回答

0

我也面臨同樣的問題,現在它解決了。檢查如果你使用最新的sdk版本或沒有更新它,如果不是。更新sdk後,也跨檢查您的系統環境變量是否正確定位。然後重新啓動項目。

相關問題