4
我最近將我的Eclipse項目導入Studio。我通過從Eclipse導出的gradle導出它。導入後,我得到這個錯誤。意外的char''build.gradle
Error:(16, 0) Cause: startup failed:
build file 'D:\Android\Projects\MainDIr\Project\build.gradle': 16: unexpected char: '\' @ line 16, column 34.
java.srcDirs = ['libs\ormlite-android','libs\ormlite-core','src']
^
1 error
我的build.gradle中的4行標記爲紅色。這些引用到libs文件夾庫路徑。我的所有庫都正在導入成功。
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['libs\ormlite-android','libs\ormlite-core','src']
resources.srcDirs = ['libs\ormlite-android','libs\ormlite-core','src']
aidl.srcDirs = ['libs\ormlite-android','libs\ormlite-core','src']
renderscript.srcDirs = ['libs\ormlite-android','libs\ormlite-core','src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
嘗試用(/)正斜槓? – Raghavendra
嘗試以這種方式['src/main/res',src/main/res2'] – siddhesh
正向斜線解決了它。 @Raghavendra Thanks.Sorting sdk – Googler