2013-11-10 27 views
4

我無法找到專屬於演播室的線程,所以我很抱歉如果這是一個dup。我是新來的android工作室,並有一個基本問題。我安裝了所有最新的支持庫。我試圖使用AppCompat庫,但它在styles.xml文件的這一行上給我一個錯誤。Android Studio Studio AppCompat庫新手出現錯誤q

<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> 
    <!-- Customize your theme here. --> 
</style> 

的錯誤是如下:

Gradle: Execution failed for task ':FeedBackUser:processDebugResources'. 
> Could not call IncrementalTask.taskAction() on task  ':FeedBackUser:processDebugResources' 

這是gradle這個依賴關係:

dependencies { 

// You must install or update the Support Repository through the SDK manager to use this dependency. 
// The Support Repository (separate from the corresponding library) can be found in the Extras category. 
compile 'com.android.support:support-v4:18.0.0' 

// You must install or update the Support Repository through the SDK manager to use this dependency. 
// The Support Repository (separate from the corresponding library) can be found in the Extras category. 
compile 'com.android.support:appcompat-v7:0.0.+' 

}

支持V4是好的,它表現了我android studio的外部庫區域。 AppCompat沒有。由於它位於與其他支持庫一起安裝的目錄中,因此它是絕對安裝的。我該怎麼辦?

回答

5

嘗試改變依賴於未來:

dependencies { 
    compile 'com.android.support:support-v4:18.0.0' 
    compile 'com.android.support:appcompat-v7:18.0.+' 
} 
+0

這工作,但我不知道爲什麼?它的標註方式和現在的版本有什麼區別? – user2097211

+0

appcompact的舊版本是** 0.0。+ **,但它應該是** 18.0。+ ** –