1
私はすでにgradleで利用可能なsplitオプションについて知っています。これは異なるCPUアーキテクチャ用に複数のapkを生成します。特定のCPUアーキテクチャのapkファイルを作成する方法
armeabi-v7aとx86アーキテクチャに含まれているapkをどのように生成できますか?
私はすでにgradleで利用可能なsplitオプションについて知っています。これは異なるCPUアーキテクチャ用に複数のapkを生成します。特定のCPUアーキテクチャのapkファイルを作成する方法
armeabi-v7aとx86アーキテクチャに含まれているapkをどのように生成できますか?
Step 1: Add the class path dependency to the project level build.gradle file.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath "io.realm:realm-gradle-plugin:3.7.1"
}
}
Step 2: Apply the realm-android plugin to the top of the application level build.gradle file.
apply plugin: 'realm-android'
Step3: Add this to the application’s build.gradle:
realm {
syncEnabled = true;
}
Step4:Add this to the application’s build.gradle:
android{
defaultConfig{
applicatioId “com.android.abi.myapplication”
minSdkVersion 16
targetSdkVersion 25
ndk{
abiFilters “armeabi-v7a” , “x86” // add your required cpu architecture
}
}
}
そして、gradleを同期してapkをビルドすると、armeabi-v7aとx86のライブラリファイルしか見つかりません。
最初のステップ:あなたのフォーマットを改善する回答。 **コード**セグメントには4つのスペースしか使用しないでください。その**プレビュー**ウィンドウは理由のために存在する! – GhostCat
この回答を参照してください:http://stackoverflow.com/questions/19268647/gradle-android-build-for-different-processor-architectures/19554367#19554367 –