Reputation: 4863
I have updated buildToolsVersion to '26.0.2' in the project and now I'm getting such error, when trying to build release apk. Any ideas how to solve it?
com.android.ide.common.process.ProcessException: Error while executing process /Users/Iryna/Library/Android/sdk/build-tools/26.0.2/aapt with arguments {package -f --no-crunch -I /Users/Iryna/Library/Android/sdk/platforms/android-25/android.jar -M /Users/Iryna/Documents/Projects/xxx/mobile/android/app/build/intermediates/manifests/full/release/AndroidManifest.xml -S /Users/Iryna/Documents/Projects/xxx/mobile/android/app/build/intermediates/res/merged/release -m -J
I have tried come back to the old version (25.0.0) of build tools, but if I'm decreasing it, I'm getting gradle error:
Could not find method implementation() for arguments [com.google.firebase:firebase-core:11.6.0] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler. Open File
build.gradle app
android {
compileSdkVersion 25
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "com.cityfalcon"
minSdkVersion 17
targetSdkVersion 23
versionCode 10
versionName "1.8"
multiDexEnabled true
vectorDrawables.useSupportLibrary true
ndk {
abiFilters "armeabi-v7a", "x86"
}
}
signingConfigs {
debug {
storeFile file(XXX_RELEASE_STORE_FILE)
storePassword XXX_RELEASE_STORE_PASSWORD
keyAlias XXX_RELEASE_KEY_ALIAS
keyPassword XXX_RELEASE_KEY_PASSWORD
}
release {
storeFile file(XXX_RELEASE_STORE_FILE)
storePassword XXX_RELEASE_STORE_PASSWORD
keyAlias XXX_RELEASE_KEY_ALIAS
keyPassword XXX_RELEASE_KEY_PASSWORD
}
}
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86"
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
debuggable false
}
release {
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
signingConfig signingConfigs.release
}
}
// 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
}
}
}
}
dependencies {
implementation 'com.google.firebase:firebase-core:11.6.0'
implementation 'com.google.firebase:firebase-crash:11.6.0'
compile project(':react-native-linkedin-login')
compile project(':react-native-twitter-signin')
compile project(':react-native-google-signin')
compile project(':react-native-fbsdk')
compile project(':react-native-spinkit')
compile project(':react-native-linear-gradient')
compile('com.twitter.sdk.android:twitter:2.3.2@aar') {
transitive = true;
}
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:25.0.0'
compile 'com.android.support:design:25.0.0'
compile 'com.facebook.react:react-native:0.39.2'
// From node_modules
compile 'com.instabug.library:instabug:4.0.8'
compile(project(':react-native-google-signin')) {
exclude group: "com.google.android.gms" // very important
}
compile 'org.piwik.sdk:piwik-sdk:1.0.2'
compile 'com.google.android.gms:play-services:11.6.0'
compile 'com.newrelic.agent.android:android-agent:5.12.0'
}
// 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'
}
apply plugin: 'com.android.application'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
// Put Fabric plugin after Android plugin
apply plugin: 'io.fabric'
apply plugin: 'com.google.gms.google-services'
build.gradle project:
buildscript {
repositories {
jcenter()
maven { url 'https://maven.fabric.io/public' }
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
classpath 'com.google.gms:google-services:3.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'io.fabric.tools:gradle:1.22.2'
classpath "com.newrelic.agent.android:agent-gradle-plugin:5.12.0"
}
}
allprojects {
repositories {
mavenLocal()
jcenter()
maven {
url "https://jitpack.io"
}
maven { url 'https://maven.fabric.io/public' }
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
google()
}
}
Upvotes: 1
Views: 1863
Reputation: 9692
I have tried come back to the old version (25.0.0) of build tools, but if I'm decreasing it, I'm getting gradle error:
Could not find method implementation() for arguments
for old version (25.0.0)
use compile
instead of implementation
compile 'com.google.firebase:firebase-core:11.6.0'
compile 'com.google.firebase:firebase-crash:11.6.0'
Upvotes: 3