Android studio導入eclipse項目找不到R文件


Android studio導入eclipse項目找不到R文件

在網上找遍了方法,都不能解決cannot resolve symbol r,當然試的方法有sync project、rebuild等,其實主要是xml文件裏引用了不正確的資源所致。

那麼在主module中的build.gradle中添加以下兩句:

android {

compileSdkVersion 22

buildToolsVersion "23.0.1"


aaptOptions.cruncherEnabled = false

aaptOptions.useNewCruncher = false


defaultConfig {

minSdkVersion 5

targetSdkVersion 17

}

即可將引用錯誤的資源文件在下方的提示信息中標示出來,現在你就可以愉快的修改錯誤文件了,比如.9圖片的問題。




個人聯繫方式:[email protected]

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章