-
-
Notifications
You must be signed in to change notification settings - Fork 651
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
master build error #3526
Comments
I found the same problem. |
Hello! Thanks @dkvbabu for filing this. I see the same thing on my own machine, and we're seeing it also in CI. The exact same commit that's in master now built just fine when I originally pushed it: I'm looking into fixing the immediate issue now. |
Update: this isn't totally trivial to fix, awkwardly. The required step to fix it seems to be to bump And indeed, that resolves this error. But then there's another error (and using
That, in turn, is helpfully explained here: The Android folks have helpfully provided a feature in the Android build toolchain that will magically take care of this... for dependencies that come via Maven. They aren't designing for RN or for dependencies through NPM; and so when we have dependencies that we compile from source, they effectively assume that those dependencies are part of our codebase and we can just upgrade them ourselves. Anyway, the feature they do provide is to put this into
It magically converts references within Maven dependencies to the Android Support Library ( If I apply that, the ...but then there's a new class of error. Four of our NPM-based dependencies, from the RN ecosystem, get compile errors. They look like this:
They all seem to be failures to find various Still working on that one. It'd be straightforward to do with a small patch to each of these dependencies (and Android Studio is eager to make those changes for me, even)... but patching our dependencies isn't a normal thing in our build process, so actually doing that isn't straightforward. Next thing I expect to try is upgrading those particular dependencies -- crossing fingers that each one of the four (a) has made a newer release that makes this switch, (b) has such a release that doesn't break something else for us due to whatever random other changes they've made. |
Welp, first one I look at, there's a PR for it just today: react-native-image-picker/react-native-image-picker#1102 |
Aha, located what looks like the key discussion of this upstream:
Some good details in that thread. In particular, we've scrupulously written down actual concrete versions in our
I'm pleasantly surprised to find that all but one of them have been equally careful! The one exception is
Happily the problem is fixed upstream there, as of yesterday: So: I'm going to hold off on attempting the AndroidX stuff (people say RN isn't ready for it before 0.60 anyway), and also hold off on the |
Oof, we're on (v0.21.5 is only just over a year old! 2018-04-09.) So I'll first try to work around in a limited way without an upgrade. Then can attempt an upgrade after our build is working again -- it'd be good to refresh our dependencies in general. |
Fixed! @dkvbabu @wsupajirakit please rebase and try again, and confirm that it's working for you too. Some handy discussion at react-native-device-info/react-native-device-info#693 (comment) of how to diagnose the issue (with Also in the same comment, a workaround that's a bit of a bigger hammer than I ended up using. I did this, to activate the specific logic that the
The workaround suggested in that comment would, IIUC, simply force any dependency's wildcard reference to use a particular version:
|
Thanks. It is fine now.
Regards
dk venkatesh babu
…________________________________
From: Greg Price <notifications@github.com>
Sent: Wednesday, June 19, 2019 5:28 AM
To: zulip/zulip-mobile
Cc: dkvbabu; Mention
Subject: Re: [zulip/zulip-mobile] master build error (#3526)
Fixed! @dkvbabu<https://github.com/dkvbabu> @wsupajirakit<https://github.com/wsupajirakit> please rebase and try again, and confirm that it's working for you too.
Some handy discussion at react-native-device-info/react-native-device-info#693 (comment)<react-native-device-info/react-native-device-info#693 (comment)> of how to diagnose the issue (with ./gradlew -q app:dependencies).
Also in the same comment, a workaround that's a bit of a bigger hammer than I ended up using. I did this, to activate the specific logic that the react-native-device-info library's build.gradle has to control the version:
+project(":react-native-device-info").beforeEvaluate {
+ ext.googlePlayServicesVersion = "16.1.0"
+}
The workaround suggested in that comment would, IIUC, simply force any dependency's wildcard reference to use a particular version:
configurations.all {
resolutionStrategy.force 'com.google.android.gms:play-services-gcm:16.1.0'
}
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#3526?email_source=notifications&email_token=ACPPERVBVMNYRGAD54N2HHDP3FZBZA5CNFSM4HY5YCQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYAJIGY#issuecomment-503354395>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ACPPERSXXK2S7GYQX7SHISTP3FZBZANCNFSM4HY5YCQQ>.
|
Fixes zulip#3526. Causes new error: java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes. Program type already present: android.support.v4.app.INotificationSideChannel
HI,
I am facing below problem while running react-native run-android
FAILURE: Build failed with an exception.
Execution failed for task ':app:processDebugResources'.
/home/ubunto/.gradle/caches/transforms-1/files-1.1/drawee-1.10.0.aar/bfe2e3ba3748905ed6faebb6039cbe7e/res/values/values.xml:3:5-58:857: AAPT: error: resource android:attr/ttcIndex not found.
error: failed linking references.
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 33s
Please look into this and reply.
Regards
dk venkatesh babu
The text was updated successfully, but these errors were encountered: