Closed ththugues44 closed 5 years ago
Hey @noellaby . I am facing a similar issue. Did you found a solution ?
edit: seem linked to https://github.com/tinycreative/react-native-intercom/issues/238
Also facing this. I had to downgrade to v10 from over a year ago.
I'm not a gradle expert in any way, shape or form, but I managed to hack mine around to get it to work. I think I used build tools 28, or something.
Not sure if posting my gradle file might help?
Yo, I fixed this by adding explicit version config in android/build.gradle:
buildscript {
ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 16
compileSdkVersion = 28
targetSdkVersion = 28
supportLibVersion = "28.0.0"
}
If you are using different SDK - just replace version here.
Hello I see error when i build apk release : `
C:\Users\BRAVE.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar\37f0970dffb3014c2eb0bedc86eceb26\res\values-v28\values-v28.xml:9:5-12:13: AAPT: error: resource android:attr/dialogCornerRadius not found.
J:\Projet\foongon\react native\Entreprise\Katika\node_modules\react-native-intercom\android\build\intermediates\res\merged\release\values-v28\values-v28.xml:11: AAPT: error: resource android:attr/dialogCornerRadius not found.
C:\Users\BRAVE.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar\37f0970dffb3014c2eb0bedc86eceb26\res\values\values.xml:1304:5-69: AAPT: error: resource android:attr/fontVariationSettings not found.
C:\Users\BRAVE.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar\37f0970dffb3014c2eb0bedc86eceb26\res\values\values.xml:1304:5-69: AAPT: error: resource android:attr/ttcIndex not found.
error: failed linking references.
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':react-native-intercom:verifyReleaseResources'.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 8m 10s 487 actionable tasks: 13 executed, 474 up-to-date
My Build.gradle is :
` apply plugin: "com.android.application" apply plugin: "io.fabric"
import com.android.build.OutputFile import groovy.json.JsonSlurper
def getVersionName() { def inputFile = new File("../package.json") def packageJson = new JsonSlurper().parseText(inputFile.text) return packageJson["version"] }
def getVersionCode() { def versionName = getVersionName() def versionCode = versionName.replace('.', '').toInteger() return versionCode }
/**
react-native bundle
with the correct arguments during the Android buildapply from: "../../node_modules/react-native/react.gradle"
line.project.ext.react = [ entryFile: "index.js", bundleInRelease : true, resourcesDirRelease : "src/release/res" ]
apply from: "../../node_modules/react-native/react.gradle" apply from: "../../node_modules/react-native-code-push/android/codepush.gradle"
/**
/**
Run Proguard to shrink the Java bytecode in release builds. */ //def enableProguardInReleaseBuilds = false // a true pour reduire la taille du fichier def enableProguardInReleaseBuilds = false def generatedVersionName = getVersionName() def generatedVersionCode = getVersionCode() android { compileSdkVersion 28 buildToolsVersion "27.0.3"
defaultConfig { applicationId "com.katika" minSdkVersion 16 targetSdkVersion 28 versionCode generatedVersionCode versionName generatedVersionName multiDexEnabled true ndk { abiFilters "armeabi-v7a", "x86" } }
configurations.all { resolutionStrategy { //force 'com.android.support:design:27.0.2' //force 'com.android.support:support-v4:27.0.2' // force 'com.android.support:appcompat-v7:27.0.2' } resolutionStrategy.eachDependency { details -> def requested = details.requested if (requested.group == 'com.android.support') { if (!requested.name.startsWith("multidex")) { details.useVersion '27.1.1' } } } }
splits { abi { reset() enable enableSeparateBuildPerCPUArchitecture universalApk false // If true, also generate a universal APK include "armeabi-v7a", "x86" } } signingConfigs { release { if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) { storeFile file(MYAPP_RELEASE_STORE_FILE) storePassword MYAPP_RELEASE_STORE_PASSWORD keyAlias MYAPP_RELEASE_KEY_ALIAS keyPassword MYAPP_RELEASE_KEY_PASSWORD } } } buildTypes {
} release { minifyEnabled enableProguardInReleaseBuilds proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" signingConfig signingConfigs.release //buildConfigField "String", "CODEPUSH_KEY", "bySq16a9P0d2pIdf9ZZvyaRJbzcOSJ8Sg7bHX" } } // 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 { compile project(':react-native-sound') compile project(':react-native-push-notification') compile project(':react-native-device-info') compile project(':amazon-cognito-identity-js') compile project(':react-native-vector-icons') compile project(':react-native-android-library-freshchat-sdk') compile project(':@aws-amplify/pushnotification') implementation 'com.android.support:multidex:1.0.3' compile project(':react-native-intercom') compile project(':appcenter-push') compile project(':appcenter-crashes') compile project(':appcenter-analytics') compile project(':appcenter') compile project(':react-native-appstore-version-checker') compile project(':react-native-version-check') compile project(':react-native-code-push') compile project(':react-native-firebase') compile project(':react-native-background-timer') compile project(':react-native-facebook-account-kit') compile fileTree(dir: "libs", include: ["*.jar"]) compile "com.android.support:appcompat-v7:27.1.1" compile "com.facebook.react:react-native:+" // From node_modules compile project(':react-native-android-library-freshchat-sdk') compile 'com.github.freshdesk:freshchat-android:1.0.0' compile 'com.firebase:firebase-jobdispatcher:0.7.0'
// Firebase dependencies //implementation "com.google.android.gms:play-services-base:15.0.1" implementation "com.google.firebase:firebase-core:16.0.1" implementation "com.google.firebase:firebase-functions:16.0.1" implementation 'com.google.firebase:firebase-messaging:17.1.0' implementation 'me.leolin:ShortcutBadger:1.1.21@aar' // <-- Add this line if you wish to use badge on Android implementation "com.google.firebase:firebase-firestore:17.0.2"
implementation('com.crashlytics.sdk.android:crashlytics:2.9.4@aar') { transitive = true } compile 'io.intercom.android:intercom-sdk-fcm:5.+' }
// 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 from: "../../node_modules/react-native-vector-icons/fonts.gradle"
`
Please what is solution ?`