gradle を使用して apk を生成します。インストールした後、リリースされたバージョンでエラーが発生しました: java.lang.UnsatisfiedLinkError: Native method not found: com.fss.e.b.a:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
しかし、デバッグ 1 は良さそうです。私が書いた build.gradle は以下のとおりです。
apply plugin: 'android'
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
compile project(':fss:libs:actionbarsherlock')
compile project(':fss:libs:library')
compile project(':library')
}
android {
compileSdkVersion 17
buildToolsVersion "18.0.1"
signingConfigs {
myConfig{
}
}
buildTypes{
release {
signingConfig signingConfigs.myConfig
}
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
// Move the tests to tests/java, tests/res, etc...
instrumentTest.setRoot('tests')
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')
}
}
tasks.withType(Compile) {
options.encoding = "UTF-8"
}
task copyNativeLibs(type: Copy) {
from fileTree(dir: 'libs', include: '**/*.so' )
into 'build/native-libs'
}
tasks.withType(Compile) { compileTask -> compileTask.dependsOn copyNativeLibs }
clean.dependsOn 'cleanCopyNativeLibs'
tasks.withType(com.android.build.gradle.tasks.PackageApplication) { pkgTask ->
pkgTask.jniDir new File('build/native-libs')
}