tinycreative / react-native-intercom

React Native wrapper for Intercom.io
MIT License
406 stars 280 forks source link

Android: Unexpected element <queries> found in <manifest> #410

Closed jfbn closed 3 years ago

jfbn commented 3 years ago

I am trying to install Intercom for our React Native application. So far I have succeeded with iOS but I am having trouble with Android.

When I try to build my application I am receiving this issue:

Execution failed for task ':app:processDebugResources'. A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade Android resource linking failed /home/johan/.gradle/caches/transforms-2/files-2.1/5ae10d8f62f79dff5b34f16a11e1c2f7/jetified-intercom-sdk-base-8.3.0/AndroidManifest.xml:10:5-18:15: AAPT: error: unexpected element \<queries> found in \<manifest>.

I have not found any other similar issues here or anywhere else. I don't know what the problem is.

It was a bit tricky to install the library, as the instructions here did not align with the instructions on https://developers.intercom.com/installing-intercom/docs/android-installation

The instructions on this library calls for linking, which is deprecated for RN > 0.60. I have tried going through the installation process both with and without linking manually (with the command).

I have opted to go with the installation that does not include push notifications.

derekblank commented 3 years ago

@jfbn I am running into the same error AAPT: error: unexpected element <queries> found in <manifest> when trying to install this library with react-native 0.63.3.

I opted to go with the installation that does not include push notifications as well, but am still encountering the error. Were you able to find a solution around this?

jfbn commented 3 years ago

@derekblank For me it came down to updating Gradle. You can read more about it here. If you open Android Studio you should be able to update Gradle from there.

derekblank commented 3 years ago

@jfbn Thanks heaps! Upgrading gradle fixed it.

For anyone else encountering the issue, check out the answers in the StackOverflow question posted in the comment above.