Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot build release Execution failed for task ':appcenter-push:verifyReleaseResources'. #481

Closed
GavinThomas1192 opened this issue Dec 10, 2018 · 10 comments
Labels

Comments

@GavinThomas1192
Copy link

Description

When building my app for release I receive this error.

  • What went wrong:
    Execution failed for task ':appcenter-push:verifyReleaseResources'.

com.android.ide.common.process.ProcessException: Failed to execute aapt

Further up the stack. The apparent issue.

/Users/mycompany/.gradle/caches/transforms-1/files-1.1/react-native-0.57.0.aar/xxxx/res/values/values.xml:42:5-44:13: AAPT: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.Dialog'.

/Users/mycompany/.gradle/caches/transforms-1/files-1.1/react-native-0.57.0.aar/xxxx/res/values/values.xml:48:5-50:13: AAPT: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.Dialog'.

/Users/mycompany/.gradle/caches/transforms-1/files-1.1/react-native-0.57.0.aar/xxxx/res/values/values.xml:62:5-64:13: AAPT: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.Dialog'.

/Users/mycompany/.gradle/caches/transforms-1/files-1.1/react-native-0.57.0.aar/xxxx/res/values/values.xml:68:5-70:13: AAPT: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.Dialog'.

/Users/mycompany/.gradle/caches/transforms-1/files-1.1/react-native-0.57.0.aar/xxxx/res/values/values.xml:96:5-98:13: AAPT: Error retrieving parent for item: No resource found that matches the given name '@style/Theme.AppCompat.Light.NoActionBar'.

/Users/mycompany/.gradle/caches/transforms-1/files-1.1/react-native-0.57.0.aar/09b77184e56c0864xxxxcc7b4b4d9948af7f/res/values/values.xml:99:5-104:13: AAPT: No resource found that matches the given name: attr 'windowActionBar'.

build.gradle's
Android
`
buildscript {
ext {
buildToolsVersion = "27.0.3"
minSdkVersion = 16
compileSdkVersion = 27
targetSdkVersion = 26
supportLibVersion = "27.1.1"
googlePlayServicesVersion = "15.0.1"

}
repositories {
    google()
    jcenter()
    mavenCentral()

}
dependencies {
    classpath 'com.android.tools.build:gradle:3.1.4'
    classpath 'com.google.gms:google-services:4.0.1'


    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}

}

subprojects {
project.configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'com.android.support'
&& !details.requested.name.contains('multidex') ) {
details.useVersion "27.1.1"
}
}
}
afterEvaluate {
android {
compileSdkVersion 27
buildToolsVersion "27.0.3"

        defaultConfig {
            targetSdkVersion 26
        }
    }
}

}

allprojects {
repositories {
google()
mavenLocal()
jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
}
}

task wrapper(type: Wrapper) {
gradleVersion = '4.4'
distributionUrl = distributionUrl.replace("bin", "all")
}
`

App
`
dependencies {
compile project(':appcenter-push')
compile project(':react-native-gesture-handler')
compile project(':react-native-add-calendar-event')
compile project(':react-native-share')
compile project(':appcenter-crashes')
compile project(':appcenter-analytics')
compile project(':appcenter')
compile project(':react-native-calendar-events')
compile project(':rn-fetch-blob')
compile project(':react-native-maps')
compile project(':react-native-interactable')
compile project(':react-native-file-viewer')
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation 'com.facebook.react:react-native:+'
// From node_modules
implementation 'com.android.support:support-v4:27.1.1'
}

// 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'
}
// Add to the bottom of the file
apply plugin: 'com.google.gms.google-services'
com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true
`

Repro Steps

I can successfully build my debugRelease in development.

  1. ./gradlew clean && ./gradlew assembleRelease

I can't share my repo as it's under NDA.

Details

  1. Which version of the App Center SDK are you using?
    1.10

  2. Which OS version did you experience the issue on?
    NA

  3. What device version did you see this error on? Were you using an emulator or a physical device?
    Failed at buildtime

  4. What third party libraries are you using?
    NA

  5. Run the following command and paste the output below: react-native info
    React Native Environment Info:
    System:
    OS: macOS 10.14.1
    CPU: x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
    Memory: 193.14 MB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
    Binaries:
    Node: 8.11.3 - /usr/local/bin/node
    Yarn: 1.9.4 - /usr/local/bin/yarn
    npm: 6.4.1 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
    iOS SDK:
    Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
    Android SDK:
    Build Tools: 23.0.1, 23.0.2, 25.0.0, 25.0.1, 25.0.2, 26.0.1, 26.0.2, 26.0.3, 27.0.3, 28.0.0, 28.0.2
    API Levels: 23, 25, 26, 27, 28
    IDEs:
    Android Studio: 3.1 AI-173.4819257
    Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
    react: 16.5.0 => 16.5.0
    react-native: 0.57.0 => 0.57.0
    npmGlobalPackages:
    create-react-native-app: 1.0.0
    react-native-cli: 2.0.1
    react-native-git-upgrade: 0.2.7
    react-native-rename: 2.2.2
    Place output here

  6. If you're developing for React Native iOS, run the following command and paste the output below: pod --version

@guperrot
Copy link
Member

Hi, most likely implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}" fails to resolve to version 27.1.1 correctly.

There are also issues with google package repositories right now so it might be indirectly related to https://issuetracker.google.com/issues/120759347, can you add

maven { https://dl.bintray.com/android/android-tools/ } after google() in both places where it appears in the build.gradle (buildscript and repositories)?

@GavinThomas1192
Copy link
Author

I will add the maven and report back tomorrow.
I did try manually com.android.support:appcompat-v7:27.1.1 with no success earlier before posting.

@guperrot
Copy link
Member

Hi,

I could reproduce the issue in another application.

Here is a workaround: edit node_modules/appcenter-push/android/build.gradle and add com.android.support:appcompat-v7:27.1.1 in the dependencies of that project.

The fix will be released in next version of the SDK but I don't have an ETA to communicate for the release today.

@guperrot guperrot removed the support label Dec 12, 2018
@GavinThomas1192
Copy link
Author

Ok, thank you for getting on this so fast. I had to roll with firebase because I needed push yesterday. I will transition back at a later release since I'm distributing through app center.

@mojtaba-hajishah
Copy link

I had the exact same issue, and adding com.android.support:appcompat-v7:27.1.1 to node_modules/appcenter-push/android/build.gradle fixed the issue when generating an APK file.
I successfully generated an APK file, BUT, when I install the app with that generated apk file, I can't run the app. It crashes upon start.

@oferRounds
Copy link

+1

@guperrot
Copy link
Member

@mojtaba-hajishah please create a separate issue with the crash stack trace (from Android logcat logs) and all the information requested in the github issue template.

@guperrot
Copy link
Member

guperrot commented Dec 17, 2018

Version 1.11.0 fixes the original issue from @GavinThomas1192.

For other issues after the build step, please create new issues so that the template is used.

@mojtaba-hajishah
Copy link

@guperrot downgrading to gradle build version 3.1.4 fixed all of the issues for me.

@guperrot
Copy link
Member

@mojtaba-hajishah good to know that worked for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants