0

I'm trying to use the ShowcaseView project in my project on Android Studio but can't get the project to build.

Showcase link: https://github.com/amlcurran/ShowcaseView

I have included the following:

In app/build.gradle-

compile 'com.github.amlcurran.showcaseview:library:5.4.1' 

In build.gradle-

repositories 
{
mavenCentral()
}

I get the following error:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
   > Could not resolve com.github.amlcurran.showcaseview:library:5.4.1.
     Required by:
         BLEDemo:app:unspecified
      > Could not resolve com.github.amlcurran.showcaseview:library:5.4.1.
         > Could not get resource 'https://jcenter.bintray.com/com/github/amlcurran/showcaseview/library/5.4.1/library-5.4.1.pom'.
            > Could not GET 'https://jcenter.bintray.com/com/github/amlcurran/showcaseview/library/5.4.1/library-5.4.1.pom'.
               > Connection to https://jcenter.bintray.com refused

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Ive tried several suggestions online but couldn't find a solution to this.

I have also tried to import the library an include it in settings.gradle and get an error.

Can some please help me.

Thank you in advance.

Keerthi Mukku
  • 113
  • 1
  • 1
  • 9

2 Answers2

2

It looks like gradle is searching for the library in jCenter. If you add jCenter to your repositories closure does it work? Like this:

repositories 
{
    mavenCentral()
    jCenter()
}
Alex Curran
  • 8,818
  • 6
  • 49
  • 55
  • I've tried your method and it comes up with the same error :/ – Keerthi Mukku Apr 05 '16 at 12:48
  • really weird. I don't know if there was some publishing issue. Can you try changing the version to 5.4.3? That version has definitely been published – Alex Curran Apr 06 '16 at 20:52
  • 5.4.3 dependency doesn't work (guessing due to proxy as Kim mentioned above) but adding the library works! Thank you :) Could you advise me on one more thing if you don't mind? I'm trying to showcase on action bar and I've seen a lot of posts saying that app compact is not capable of this .. I don't seem to be using app compact so could you give me a work around this? – Keerthi Mukku Apr 12 '16 at 16:06
0

Are there any proxy-servers in use in your environment? If yes: configure it with your user and password. The build cannot find the package, which is located on github and breaks with an error. You can check this answer if you want to learn more how to do this: gradle-behind-proxy-in-android-studio-1-3

Community
  • 1
  • 1
KimKulling
  • 2,654
  • 1
  • 15
  • 26
  • Thank you. I'm a bit confused on what this line of code represents: [systemProp.http.nonProxyHosts=*.nonproxyrepos.com|localhost] Do you have any idea? – Keerthi Mukku Apr 04 '16 at 13:38
  • Just follow the referenced link: you have to change these lines in the properties if I have understood it right: https://docs.gradle.org/current/userguide/build_environment.html#sec:accessing_the_web_via_a_proxy. – KimKulling Apr 04 '16 at 13:43
  • I don't know how to change this line: [systemProp.http.nonProxyHosts=*.nonproxyrepos.com|localhost] – Keerthi Mukku Apr 05 '16 at 12:47
  • Try [systemProp.http.nonProxyHosts=localhost] – KimKulling Apr 05 '16 at 14:31
  • show this answer https://stackoverflow.com/questions/22141856/android-showcase-view-how-to-use/52619873#52619873 – Sanjay Hadiya Oct 03 '18 at 04:52