tinycreative / react-native-intercom

React Native wrapper for Intercom.io
MIT License
405 stars 279 forks source link

You have not accepted the license agreements of the following SDK components #64

Closed GeoffreyPlitt closed 7 years ago

GeoffreyPlitt commented 7 years ago

How do I get around this?

A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApk'.
   > A problem occurred configuring project ':react-native-intercom'.
      > You have not accepted the license agreements of the following SDK components:
        [Android Support Repository].
        Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
        Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html

I don't need android studio, and our CI needs to build this with command-line-only tools. All of our other libraries with android parts have worked fine so far, seems to be something exclusive to this library.

browniefed commented 7 years ago

http://stackoverflow.com/questions/38096225/automatically-accept-all-sdk-licences

GeoffreyPlitt commented 7 years ago

Right, I'm already doing what the article suggests:

echo 'y' | android --verbose update sdk --no-ui --all --filter android-25,tools,platform-tools,build-tools-25.0.1,extra-android-support,extra-android-m2repository,extra-google-m2repository

As mentioned in the article, the exact version of libs has to be specified. I upgraded a few to 25, are the versions above correct?

It would be nice if the README included an exact command (like mine above) that satisfies what this library needs. I still haven't found the right combo, still getting the original error above in my CI-- although it does work locally.

browniefed commented 7 years ago

I do not use this so I can't be of much help. react-native-intercom requires you add your own intercom module so whatever the latest I believe will likely work. A few others have used this on android so maybe trying pinging one of them in a separate thread.

GeoffreyPlitt commented 7 years ago

Thanks @browniefed . I'm not sure what you mean by 'add your own intercom module so whatever the latest I believe'. I got it working without adding my own module, and I'm not sure how that suggestion gives me version numbers.

Do you know which people used this on android, or how I'd find out?

kageurufu commented 7 years ago

I don't have a CI listing like you want there, what errors spit out after you try with that one? Have you added intercom-sdk to your build.gradle as shown at https://github.com/intercom/intercom-android ?

GeoffreyPlitt commented 7 years ago

Update: I solved it with the following script, in case it helps anyone else.

(while sleep 3; do echo "y"; done) | android --verbose update sdk --no-ui --all --filter android-23,android-25,tools,platform-tools,build-tools-23.0.1,build-tools-23.0.2,build-tools-24.0.3,build-tools-25.0.1,extra-android-m2repository,extra-android-m2repository,extra-google-m2repository
browniefed commented 7 years ago

Awesome, glad you got this solved. Hopefully it helps others.