所以这发生了.无论我在build.gradle上做什么,所有的APK都会以native_code =’x86_64’标志出来,所以当我将应用程序部署到商店时,结果是有15K不兼容的设备,只有19兼容.我首先想到,不知何故,安装NDK是原因,或者我修改后的构建脚本.但是当我通过Generate Signed APK向导时,它仍然会发生.分裂块也最初缺失,并没有帮助.最奇怪的是,当我通过控制台推送安装时,IT工作!
我也尝试过切换到推荐的JRE,还有几个关于文件创建的APK命名策略,比如将输出移动到不同的目录或不使用文件构造函数.
我的build.gradle看起来像这样:
defaultConfig { applicationId "com.chiskosystems.brokr" versionCode versionNumber versionName "${versionMajor}.${versionMinor}.${versionPatch} (${versionBuild}) Release" minSdkVersion 16 targetSdkVersion 25 testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" multiDexEnabled true jackOptions { enabled false } vectorDrawables { useSupportLibrary true } } splits { abi { enable true reset() include 'armeabi','armeabi-v7a','arm64-v8a' } } project.ext.versionCodes = ['armeabi': 1,'armeabi-v7a': 2,'arm64-v8a': 3] applicationVariants.all { variant -> variant.outputs.each { output -> def fileNaming = "apk/brokr" def outputFile = output.outputFile output.versionCodeOverride = project.ext.versionCodes.get(output.getFilter( com.android.build.OutputFile.ABI),0) * 10000000 + android.defaultConfig.versionCode } } signingConfigs { release { try { storeFile file('../mystore.jks') keyAlias 'release' storePassword KEYSTORE_PASSWORD keyPassword KEY_PASSWORD } catch (ex) { throw new InvalidUserDataException("You should define KEYSTORE_PASSWORD and KEY_PASSWORD in gradle.properties.") } } } dataBinding { enabled true } dexOptions { javaMaxHeapSize "3g" preDexLibraries false } buildTypes { release { minifyEnabled false proguardFile 'path/proguard-project.pro' ... buildConfigField "String",'SERVER','"https://myfirebaseserver.com"' debuggable false signingConfig signingConfigs.release } debug { minifyEnabled false applicationIdSuffix ".debug" versionNameSuffix "-debug" buildConfigField "String",'"https://myfirebaseserver.com"' } } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } productFlavors { sandBox { buildConfigField "String",'PAYPAL_ENV','"PayPalConfiguration.ENVIRONMENT_NO_NETWORK"' } full { buildConfigField "String",'"PayPalConfiguration.ENVIRONMENT_PRODUCTION"' signingConfig signingConfigs.release targetSdkVersion 25 } }
发生在Win和Unix系统上.我花了整整一天修改脚本没有成功,此时我很无奈.
关于哔哔声发生了什么的任何想法?非常感谢!
解决方法
原因是依赖:
compile 'com.lambdaworks:scrypt:1.4.0'
显然是自动抓住我的笔记本电脑的架构并在那里贴上那面旗帜.