Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

About Android Studio 0.5 'sourceSets'

I'm update the Android Studio to version 0.5, but the 'build.gradle' file has some warning.

Like this: 'main' in 'build' cannot be applied to ...

And in Android Studio's project panel,the source file show some warning, visit image https://raw.github.com/MarkMjw/xiangmao.github.io/master/test.png

The code:

sourceSets {
    main{
        manifest.srcFile 'AndroidManifest.xml'
        java.srcDirs = ['src']
        resources.srcDirs = ['src']
        aidl.srcDirs = ['src']
        renderscript.srcDirs = ['src']
        res.srcDirs = ['res']
        assets.srcDirs = ['assets']
    }
    ...
}

My project created by Eclipse, and some members are still use Eclipse, but the others are use Android Studio, so I don't change directory structure to Gradle style.

I should be how to solve this problem?

like image 447
xiangmao Avatar asked Nov 11 '22 11:11

xiangmao


1 Answers

This is bug https://code.google.com/p/android/issues/detail?id=66758. We're trying to get a patch release for 0.5.0 put together to fix this among other issues.

According to the bug report, users have been able to work around it by removing the line:

resources.srcDirs = ['src'] 

I haven't tried it personally, but you might want to see if it works for you.

like image 192
Scott Barta Avatar answered Nov 15 '22 11:11

Scott Barta