Ramin
Ramin

Reputation: 484

maven SNAPSHOT doesn't compile in gradle

I'm trying to use paho Mqtt's android client in android studio and using gradle to add dependencies, I use the following in project build.gradle:

maven { url "https://repo.eclipse.org/content/repositories/paho-snapshots/" }

and in app build.gradle:

compile('org.eclipse.paho:org.eclipse.paho.android.service:1.0.3-SNAPSHOT') {
        exclude module: 'support-v4'
    }

yet this is giving me failed to resolve error. I tried with release version (1.0.2) and it compiles without any errors so I must be doing something wrong with the SNAPSHOT dependency. I've tried as many scripts as googling yielded to no result.

any help is greatly appreciated.

Upvotes: 2

Views: 1592

Answers (1)

Sachet Bajracharya
Sachet Bajracharya

Reputation: 401

Use below code in gradle.

repositories {
 maven {
    url "https://repo.eclipse.org/content/repositories/paho-snapshots/"
   }
}

dependencies {
compile('org.eclipse.paho:org.eclipse.paho.android.service:1.0.3-SNAPSHOT') {
    exclude module: 'support-v4'
 }
}

Reference http://www.hivemq.com/blog/mqtt-client-library-enyclopedia-paho-android-service

Upvotes: 1

Related Questions