在android studio中重新配置Libs目录

jar包和so库可以一起放在libs目录下不用再新建jniLibs文件夹,将原来libs目录移动到main目录下

android {
    sourceSets.main {
        //aidl.srcDirs = ['src/main/aidl']
        java.srcDir "src/main/java"
        res.srcDir "src/main/res"
        //disable automatic ndk-build call
        jni.srcDirs = []
        jniLibs.srcDir "src/main/libs"
        manifest.srcFile "src/main/AndroidManifest.xml"
        assets.srcDir "src/main/assets"
		resources.srcDirs = ['src/main/resources/']
    }
}

dependencies {
    compile fileTree(dir: 'src/main/libs', include: ['*.jar'])
}


没有更多推荐了,返回首页