2017-03-03 48 views
0

我無法同步從android studio外部導入的android項目。任何人都有解決底部問題的解決方案?我需要一個幫助修復Android工作室中的gradle項目同步失敗

錯誤:模塊'androidsupportv7appcompat':找不到平臺'Google Inc.:Google API:19'。

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 25 
    buildToolsVersion "25.0.2" 

    defaultConfig { 
     applicationId "com.optimusinfo.mclmcgill_test" 
     minSdkVersion 15 
     targetSdkVersion 25 
    } 

    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' 
     } 
    } 
} 

dependencies { 
    compile project(':androidsupportv7appcompat') 
    compile project(':googleplayservices_lib') 
    compile files('libs/FlurryAnalytics-5.1.0.jar') 
    compile files('libs/gson-2.2.4.jar') 
    compile files('libs/volley.jar') 
} 

enter image description here

+1

添加build.gradle文件內容 –

+0

我需要在build.gradle文件中添加什麼內容? –

+0

我的意思是將它添加到您的問題 –

回答

0

轉到 首選項>外觀&行爲>系統設置> Android的SDK 檢查爲Android API級別19箱(AKA的是Android 4.4(KitKat)的)並安裝它 其安裝後要麼重新運行該項目,或者只是編譯搖籃

也能改變你targetSDK 25

嘗試費爾e>使緩存無效並重新啓動>無效並重新啓動

+0

評論不適用於擴展討論;這個對話已經[轉移到聊天](http://chat.stackoverflow.com/rooms/137376/discussion-on-answer-by-adam-gardner-i-need-a-help-to-fix-gradle-項目同步-FA)。 –

相關問題