Я могу собрать отладочную версию моего приложения на базе компьютера. Однако, когда я пытаюсь собрать релиз apk, я получаю следующую ошибку:
Не удалось выполнить задачу ': blelibrary: verifyReleaseResources'.
java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: ресурс Android
не удалось связать
/Users/someguy/projects/third/someapp/android/blelibrary/build/intermediates/res/merged/release/values-v26/values-v26.xml:7:
ошибка: ресурс android: attr / colorError не найден.
, за которым следует тонна сообщений, которые выглядят так:
Команда:
/Users/someguy/.gradle/caches/transforms-1/files-1.1/aapt2-3.5.0-alpha03-5252756-osx.jar/8bd335ec556ebe5abcc696b2317758fe/aapt2-3.5.0-alpha03-5252756-osx/aapt2
ссылка -I \
/Users/someguy/Library/Android/sdk/platforms/android-24/android.jar \
--manifest \
приложение для сборки выглядит так:
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.oliveapp"
minSdkVersion 19
targetSdkVersion 28
multiDexEnabled true
versionCode 35
versionName "1.3.5"
ndk {
abiFilters "armeabi-v7a", "x86"
}
packagingOptions {
exclude "lib/arm64-v8a/libgnustl_shared.so"
}
externalNativeBuild {
cmake {
arguments '-DANDROID_STL=c++_static'
}
}
}
signingConfigs {
release {
storeFile file(MYAPP_RELEASE_STORE_FILE)
storePassword MYAPP_RELEASE_STORE_PASSWORD
keyAlias MYAPP_RELEASE_KEY_ALIAS
keyPassword MYAPP_RELEASE_KEY_PASSWORD
}
}
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86"
}
}
buildTypes {
release {
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
signingConfig signingConfigs.release
}
debug {
debuggable true
}
}
// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
def versionCodes = ["armeabi-v7a":1, "x86":2]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
}
}
}
externalNativeBuild {
cmake {
path 'CMakeLists.txt'
}
}
dexOptions {
jumboMode true
}
}
dependencies {
implementation project(':react-native-i18n')
implementation project(':react-native-svg')
implementation project(':react-native-extra-dimensions-android')
implementation project(':react-native-google-analytics-bridge')
implementation project(':react-native-splash-screen')
implementation project(':react-native-image-picker')
implementation project(':react-native-spinkit')
implementation project(':react-native-fbsdk')
implementation project(':react-native-picker')
implementation 'cn.aigestudio.wheelpicker:WheelPicker:1.1.2'
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
implementation 'com.facebook.react:react-native:+'
// From node_modules
implementation 'com.facebook.fresco:fresco:2.0.0'
implementation 'com.facebook.fresco:animated-gif:2.0.0'
implementation project(':blelibrary')
implementation project(':gaialibrary')
implementation project(':vmupgradelibrary')
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta2'
implementation project(':react-native-connectivity-status')
implementation('com.google.android.gms:play-services-basement:17.0.0')
implementation('com.google.android.gms:play-services-base:17.0.0')
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.legacy:legacy-support-core-utils:1.0.0'
implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
implementation("androidx.annotation:annotation:1.1.0")
implementation("androidx.appcompat:appcompat:1.1.0-rc01")
implementation("androidx.vectordrawable:vectordrawable-animated:1.1.0-rc01")
implementation("androidx.fragment:fragment:1.1.0-rc01")
implementation("androidx.vectordrawable:vectordrawable:1.1.0-rc01")
implementation("androidx.lifecycle:lifecycle-viewmodel:2.1.0-rc01")
implementation("androidx.core:core:1.1.0-rc01")
implementation("androidx.lifecycle:lifecycle-runtime:2.1.0-rc01")
implementation("androidx.arch.core:core-common:2.1.0-rc01")
implementation("androidx.lifecycle:lifecycle-common:2.1.0-rc01")
implementation("androidx.versionedparcelable:versionedparcelable:1.1.0-rc01")
}
// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
into 'libs'
}
repositories {
}
buildscript {
repositories {
maven { url 'https://github.com/500px/500px-android-blur/raw/master/releases/' }
google()
}
dependencies {
}
}
// apply plugin: 'com.google.gms.google-services'
после запуска ./gradlew assemblyRelease --info
Я видел это сообщение:
> > Task :app:externalNativeBuildRelease Task ':app:externalNativeBuildRelease' is not up-to-date because: Task
> has not declared any outputs. externalNativeBuildRelease: starting
> build externalNativeBuildRelease: reading expected JSONs
> externalNativeBuildRelease: done reading expected JSONs
> externalNativeBuildRelease: executing build commands for targets that
> produce .so files or executables externalNativeBuildRelease: evaluate
> miniconfig externalNativeBuildRelease: evaluate library
> lib_someappfitting-Release-armeabi-v7a externalNativeBuildRelease: not
> building target lib_someappfitting because there was no build command
> for it externalNativeBuildRelease: evaluate library
> someappfittingjni-Release-armeabi-v7a externalNativeBuildRelease:
> building target library someappfittingjni because no targets are
> specified. externalNativeBuildRelease: about to build
> /Users/someguy/Library/Android/sdk/cmake/3.6.4111459/bin/cmake --build
> /Users/someguy/projects/third/someapp-app/android/app/.externalNativeBuild/cmake/release/armeabi-v7a
> --target someappfittingjni externalNativeBuildRelease: evaluate miniconfig externalNativeBuildRelease: evaluate library
> lib_someappfitting-Release-x86 externalNativeBuildRelease: not
> building target lib_someappfitting because there was no build command
> for it externalNativeBuildRelease: evaluate library
> someappfittingjni-Release-x86 externalNativeBuildRelease: building
> target library someappfittingjni because no targets are specified.
> externalNativeBuildRelease: about to build
> /Users/someguy/Library/Android/sdk/cmake/3.6.4111459/bin/cmake --build
> /Users/someguy/projects/third/someapp-app/android/app/.externalNativeBuild/cmake/release/x86
> --target someappfittingjni Build someappfittingjni x86 externalNativeBuildRelease: Executable :
> /Users/someguy/Library/Android/sdk/cmake/3.6.4111459/bin/cmake
> arguments :
> --build /Users/someguy/projects/third/someapp-app/android/app/.externalNativeBuild/cmake/release/x86
> --target someappfittingjni