我嘗試在我的項目中添加'com.android.support:design:22.2.0'。但我有錯誤「屬性」rippleColor「已被定義」。它向我展示了values.xml的路徑,其中屬性發生在哪裏。它在Mike Penz圖書館的「MaterialDrawer」中。但有一個問題,這個values.xml沒有「rippleColor」的任何屬性。也許它有一些Gradle或其他的bug?如何解決這個問題? P:當我創建新項目並添加這兩個庫(appcompat:design和com.mikepenz:materialdrawer:3.1.2)時,它的工作很好。錯誤:(1)屬性「rippleColor」已經在android studio中定義
0
A
回答
1
這個google search!你可以找到:
看來,在項目使用的是(自己的應用程序+使用的庫)命名rippleColor屬性使用至少兩次。
我建議檢查你的XML包含的顏色或任何屬性(例如colors.xml,或任何其他,嘗試在您的IDE中的整個項目中搜索它)。
檢查提到的rippleColor是否被多次使用。如果你的項目中有它,請重命名它!
Example:
1 - 谷歌播放服務
compile 'com.google.android.gms:play-services:7.8.0'
2-設計支持庫
compile 'com.android.support:design:22.2.0'
3-質感設計
compile 'com.github.navasmdc:MaterialDesign:[email protected]'
Fix this issue
首先來解決這個問題,請更換谷歌播放服務包(全包),你需要特定的一個,請查看google site在谷歌錢包有屬性叫rippleColor
,在我的情況,我需要谷歌地圖com.google.android.gms:play-services-maps:7.8.0
二可以用compile 'it.neokree:MaterialNavigationDrawer:1.3.2'
替代設計支持庫compile com.github.navasmdc:MaterialDesign:[email protected]
,如果你需要使用的導航抽屜僅
我希望THI s幫助
+0
太棒了!謝謝! – Pierry
相關問題
- 1. Android:屬性'rippleColor'已經定義
- 2. 屬性「rippleColor」已被定義
- 3. Gradle錯誤:「屬性」rippleColor「已被定義」在Android工作室
- 4. 自定義屬性錯誤 - Android Studio 1.2
- 5. '已經在.obj中定義錯誤,Visual Studio C++?
- 6. 錯誤:(2)屬性「spinnerStyle」已被定義
- 7. 錯誤:屬性「title」已被定義
- 8. 錯誤:(148)屬性「titleTextColor」已被定義
- 9. 錯誤:屬性「barLength」已被定義
- 10. 錯誤屬性已被定義
- 11. Android屬性已被定義
- 12. VC++錯誤LNK2005已經定義在
- 13. LNK2005:已經定義的錯誤
- 14. LNK2005:「已經定義的錯誤
- 15. 已經定義Obj?鏈接錯誤?
- 16. 編譯錯誤 - 成員已經定義
- 17. 恆變量已經定義XAMPP錯誤
- 18. -solved- PHP SOAP:屬性已經在WSDL文件中定義
- 19. 錯誤:當在Android項目中使用兩個庫項目時,已經定義屬性「***」
- 20. Android Studio佈局錯誤:未知屬性
- 21. Android的自定義視圖 - 自定義錯誤屬性
- 22. 類已經在android studio中崩潰
- 23. SVN「已經鎖定錯誤」
- 24. 錯誤LNK2005結構已經定義在.obj文件中
- 25. 錯誤';'期望在數組中定義,;已經使用
- 26. 功能已經在C中定義的錯誤++
- 27. 屬性「raduis」已被定義
- 28. 屬性「barLength」已被定義
- 29. 屬性textAllCaps已被定義
- 30. 屬性「titleTextStyle」已被定義
http://stackoverflow.com/questions/31183193/gradle-error-attribute-ripplecolor-has-already-been-defined-in-android-stud –
「...這個values.xml沒有任何具有「rippleColor」屬性的屬性「 –
您正在使用具有相同attrs的依賴項。檢查attrs.xml文件。 –