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

Can't build on android #957

Closed
compojoom opened this issue Sep 28, 2018 · 4 comments
Closed

Can't build on android #957

compojoom opened this issue Sep 28, 2018 · 4 comments

Comments

@compojoom
Copy link

When I try to build our project with detox I get:

> Task :detox:compileMinReactNative46DebugJavaWithJavac
Note: /Users/xx/source/node_modules/detox/android/detox/src/main/java/com/wix/detox/espresso/MultiTap.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

/Users/xx/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/b220051e8a42e6ce32a8ea873ddc20ea/res/values-v26/values-v26.xml:9:5-12:13: AAPT: error: resource android:attr/colorError not found.

/Users/xx/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/b220051e8a42e6ce32a8ea873ddc20ea/res/values-v26/values-v26.xml:13:5-16:13: AAPT: error: resource android:attr/colorError not found.

/Users/xx/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/b220051e8a42e6ce32a8ea873ddc20ea/res/values-v26/values-v26.xml:17:5-93: AAPT: error: style attribute 'android:attr/keyboardNavigationCluster' not found.

/Users/xx/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/b220051e8a42e6ce32a8ea873ddc20ea/res/values/values.xml:251:5-69: AAPT: error: resource android:attr/fontStyle not found.

/Users/xx/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/b220051e8a42e6ce32a8ea873ddc20ea/res/values/values.xml:251:5-69: AAPT: error: resource android:attr/font not found.

/Users/xx/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/b220051e8a42e6ce32a8ea873ddc20ea/res/values/values.xml:251:5-69: AAPT: error: resource android:attr/fontWeight not found.

error: failed linking references.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-camera-kit:processDebugAndroidTestResources'.

detox build works fine on ios. I also can build debug and production versions of our app with android studio, but as explained it fails when I do detox build for android.

Build used to work for us with detox 7.3 (but we couldn't run the tests, so I decided to give it a try again.)

  • Detox: "^9.0.2",
  • React Native: "0.57.1",
  • Node: 8.11.4
  • Device: android emulator
  • Xcode: 10
  • macOS: high sierra
@abrel
Copy link

abrel commented Oct 5, 2018

You should be able to fix this by adding the following lines in your android/build.gradle file

subprojects {
    afterEvaluate {project ->
        if (project.hasProperty("android")) {
            android {
                compileSdkVersion 27
                buildToolsVersion '27.0.3'
            }
        }
    }
}

@johnzim
Copy link

johnzim commented Nov 1, 2018

We ended up having to push all the way to 28 in our build.gradle (don't forget to also update appcompatibility in app/build.gradle:

subprojects {
    afterEvaluate {project ->
        if (project.hasProperty("android")) {
            android {
                compileSdkVersion 28
                buildToolsVersion '28.0.0'
            }
        }
    }
}

@stale
Copy link

stale bot commented Dec 1, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest Detox and report back.
Thank you for your contributions.

@stale stale bot added the 🏚 stale label Dec 1, 2018
@stale
Copy link

stale bot commented Dec 9, 2018

The issue has been closed for inactivity.

@stale stale bot closed this as completed Dec 9, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Dec 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants