in4001
in4001

Reputation: 656

Android studio adding external source directory

Android studio doesnt add my external jni source folder into the project with the below configuration. What could be wrong?

model {
    android {
        compileSdkVersion = 22
        buildToolsVersion = "22.0.1"

        defaultConfig.with {
            applicationId = "com.android.gl2jni"
            minSdkVersion.apiLevel = 5
            targetSdkVersion.apiLevel = 22
        }


            sourceSets.main.jni.srcDirs += ['/Volumes/Macintosh HD 2/username/Projects/UserInterface/geo/Geo']

    }

it says Error:Could not find property 'main' on SourceSet container.

Upvotes: 2

Views: 1626

Answers (1)

José Renan
José Renan

Reputation: 11

Your path contains spaces, test using a path like:

/Volumes/Macintosh_HD_2/username/Projects/UserInterface/geo/Geo

Upvotes: 1

Related Questions