tinycreative / react-native-intercom

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

【RN 0.63.2】Manifest merger failed : uses-sdk:minSdkVersion 18 cannot be smaller than version 21 declared in library #386

Closed arlovip closed 2 years ago

arlovip commented 4 years ago

Hi, thanks for this repo first. I'm using react-native-intercom in a fresh rn project. I got the error below when build android project:

Manifest merger failed : uses-sdk:minSdkVersion 18 cannot be smaller than version 21 declared in library 
[io.intercom.android:intercom-sdk-base:7.2.0] /Users/chenlong/.gradle/caches/transforms-2/files-
2.1/25e68810a8e383ca07d49fe1ea9ad99e/jetified-intercom-sdk-base-7.2.0/AndroidManifest.xml as the library 
might be using APIs not available in 18

I don't know what's wrong with this. Anyone can help me with that?

react-native info

info Fetching system and libraries information...
System:
    OS: macOS 10.15.5
    CPU: (4) x64 Intel(R) Core(TM) i7-7660U CPU @ 2.50GHz
    Memory: 253.79 MB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 12.6.0 - /usr/local/bin/node
    Yarn: 1.17.3 - /usr/local/bin/yarn
    npm: 6.9.0 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.8.4 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 13.5, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
    Android SDK:
      API Levels: 23, 24, 26, 27, 28, 29
      Build Tools: 26.0.2, 27.0.3, 28.0.2, 28.0.3, 29.0.2, 30.0.0
      System Images: android-24 | Google APIs Intel x86 Atom, android-27 | Intel x86 Atom_64, android-28 | Intel x86 Atom_64, android-28 | Google Play Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 4.0 AI-193.6911.18.40.6514223
    Xcode: 11.5/11E608c - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_161 - /usr/bin/javac
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1 
    react-native: 0.63.2 => 0.63.2 
  npmGlobalPackages:
    *react-native*: Not Found

Other info

"react-native-intercom": "^17.0.0"

Any help is appreciated. Thanks again.

arlovip commented 4 years ago

Sorry for this issue. I added implementation 'io.intercom.android:intercom-sdk-base:7.2.+' in dependencies, then error has gone. Maybe it's because I didn't use react-native link command. By the way, is it necessary to use link with rn 0.60(above)?

Generally, I use other third-party packages with npm install xxx only on Android(autolinking)`.

For iOS, run pod install after npm install xxx.

Add manually as follows in dependencies

dependencies {
......
    implementation 'io.intercom.android:intercom-sdk-base:7.2.+' // add this line here
......
envisean commented 4 years ago

@lchenfox did you ever get the your app binaries working with Intercom and RN 0.63.2?

arlovip commented 4 years ago

@envisean yes. Now it works normally both Android and iOS.