我用的是android studio 是0.4.6, com.android.tools.build:gradle:0.7.+
但我用到腾讯信鸽服务,编辑器本身不BUG不打so包,要修改项目 gradle文件,如下:
?
如果是你,要注意修改:mimi为你自己的module名哦
?
?
//打包so包----------starttask nativeLibsToJar(type: Zip, description: 'create a jar archive of the native libs') { destinationDir file("$buildDir/native-libs") baseName 'native-libs' extension 'jar' from(new File(project(':mimi').getProjectDir(), 'libs')) { include '**/*.so' } into 'lib/'}tasks.withType(Compile) { compileTask -> compileTask.dependsOn(nativeLibsToJar)}//打包so包----------enddependencies { compile 'com.android.support:appcompat-v7:+' compile files('libs/Baidu-SocialShare-SDK-Android-2.0.2.jar') compile files('libs/Baidu_MobAds_SDK.jar') compile files('libs/Baidu_MobAds_SDK_Wall.jar') compile files('libs/commons-httpclient-3.1.jar') //compile files('libs/httpmime-4.1.3.jar') compile files('libs/mta-sdk-1.6.1.jar') compile files('libs/mid-1.0.0.jar') compile files('libs/Xg-sdk-v2.0.jar') compile files('libs/wup-1.0.0-SNAPSHOT.jar') //打包so包---------- compile fileTree(dir: 'build/native-libs',include:'native-libs.jar')}
?
?
?