I had recently imported my Eclipse project into Studio. I exported it via gradle export from Eclipse. After importing I am getting this error.
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
4 lines in my build.gradle is marked as red. These are referencing to libs folder libraries path. All my libraries are being imported successfully.
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']
}
unexpected char '\'
Add /
instead of \
. Then Clean-Rebuild and RUN .
Example
aidl.srcDirs = ['libs/ormlite-android','libs/ormlite-core','src']
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With