Skip to content
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

library include #7

Closed
micabytes opened this issue Jun 3, 2016 · 7 comments
Closed

library include #7

micabytes opened this issue Jun 3, 2016 · 7 comments

Comments

@micabytes
Copy link

Awesome little library - been looking for something like this for a while, and I think this is probably the best implementation of this functionality for Android that I've seen yet.

I'm not having much luck including it from jitpack.io, though. When I try, I get the following error:

Error:A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
   > Could not resolve com.github.douglasjunior:android-simple-tooltip:0.1.1.
     Required by:
         test:app:unspecified
      > Could not resolve com.github.douglasjunior:android-simple-tooltip:0.1.1.
         > Could not get resource 'https://jitpack.io/com/github/douglasjunior/android-simple-tooltip/0.1.1/android-simple-tooltip-0.1.1.pom'.
            > Could not GET 'https://jitpack.io/com/github/douglasjunior/android-simple-tooltip/0.1.1/android-simple-tooltip-0.1.1.pom'.
               > peer not authenticated

Any idea what might be going wrong?

@douglasjunior
Copy link
Owner

Thanks, I hope this is helpful to you. 😄

First, you must have to add the jitpack repository on top level build.gradle.

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.1.0'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
        maven { url "https://jitpack.io" }  // <<<< REPOSITORY HERE
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

Then, you add the dependency in app level build.gradle.

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.3"

    defaultConfig {
        applicationId "com.your.project"
        minSdkVersion 7
        targetSdkVersion 23
        versionCode 1
        versionName "0.0.1"
    }
    buildTypes {
        ....
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.github.douglasjunior:android-simple-tooltip:0.1.1' // <<<<< DEPENDENCY HERE
    ...
}

Your configuration is that?

@micabytes
Copy link
Author

Yes. Unfortunately I still get this error.

Hmm... it seeems like this is not an uncommon problem:
jitpack/jitpack.io#423
jitpack/jitpack.io#424

It seems as if this problem is fixed with the next version of gradle (2.11). Unfortunately, it does not seem as if Android Studio can be easily updated to 2.11 just yet, and I have been too burned by Canary builds (where 2.11 seems to work) to want to risk updating to that at this time.

@douglasjunior
Copy link
Owner

I understand, but is strange. I'm using gradle 2.10.

My gradle/wrapper/gradle-wrapper.properties

#Mon Jan 25 09:28:19 BRST 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip

For now, you can download/clone the project and set up as a sub-module.

Like this:

In your settings.gradle

include ':app:'
...
include ':android-simple-tooltip'
project(':android-simple-tooltip').projectDir = new File(getSettingsDir(), '../android-simple-tooltip/library')

Make sure that the path of the project root is correct '../android-simple-tooltip/library'. In this example I am considering your project and the android-simple-tooltip will be in the same directory.

In your app/build.gradle

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    ...
    compile project(':android-simple-tooltip')
}

@douglasjunior
Copy link
Owner

@micabytes tried you to add @aar suffix on dependency?

Like this:

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.github.douglasjunior:android-simple-tooltip:0.1.1@aar' // <<<<< DEPENDENCY HERE
    ...
}

@micabytes
Copy link
Author

Alas, still does not work.

Also, after a bit of tweaking, I'm now running gradle 2.12, unfortunately without solving the problem.

@douglasjunior
Copy link
Owner

Sorry about that, but unfortunately I do not know what to do to solve.

I always used it @jitpack in other Android libraries, both Windows and MacOSX. I did not know these problems. 😢

I chose the "Jitpack" to be very helpful and easy. It provides the library directly from Github.

Please, if you find something let me know.

Out of curiosity, if you request the direct link in the browser, you can download the library?

Link: https://jitpack.io/com/github/douglasjunior/android-simple-tooltip/0.1.1/android-simple-tooltip-0.1.1.aar

@douglasjunior
Copy link
Owner

For this problem is out of our responsibility, I will close this issue for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant