ActiveAndroid icon indicating copy to clipboard operation
ActiveAndroid copied to clipboard

Gradle: Could not find com.michaelpardo:activeandroid:3.1.0-SNAPSHOT

Open JeffDerk opened this issue 10 years ago • 13 comments

I have this in my build.gradle project:

repositories {
    mavenCentral()
    maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}

and this in build.gradle app:

dependencies {
    compile 'com.michaelpardo:activeandroid:3.1.0-SNAPSHOT'
}

JeffDerk avatar Dec 19 '14 21:12 JeffDerk

+1 culd not found, is there any solutions

monkeycraps avatar Dec 22 '14 16:12 monkeycraps

You can do the following:

  • Download the project from here: https://github.com/pardom/ActiveAndroid/archive/master.zip
  • Install gradle and dependencies with ./gradlew
  • Build the library with ./gradlew jar
  • Move the generated JAR (in build/libs/ActiveAndroid.jar) to your project's libs folder
  • Add the following to your build.gradle:
dependencies {
    compile files('libs/activeandroid-3.1.0.jar')
}

Tested on Mac OS X. If you're on Windows you should use the gradlew.bat file instead.

jlhonora avatar Dec 23 '14 17:12 jlhonora

build.gradle of android "app" module

apply plugin: 'com.android.application'

buildscript {
    repositories {
    ...
    }
    dependencies {
    ...
    }
}

repositories {
    mavenCentral()
    maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}

android {
...
}

dependencies {
    compile 'com.michaelpardo:activeandroid:3.1.0-SNAPSHOT'
}

This is good works for me.

Fi5t avatar Dec 24 '14 08:12 Fi5t

Fi5t speaks the truth. Worked for me, thanks!

jonathanrz avatar Jan 02 '15 16:01 jonathanrz

I have the same problem, but the only difference (against the previous comment snipped) is that I am trying to add it to a library project.

It is only supported with the com.android.application plugin?

GermanMtz avatar Jan 21 '15 03:01 GermanMtz

@ChetUbetcha , @GermanMtz and @monkeycraps , i guess you added the repo inside the buildscript like that: buildscript { repositories { maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } } }

the right way, like @Fi5t said, is to put it in the main gradle file like that:

apply plugin: 'com.android.application' android { } repositories { mavenCentral() maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } } buildscript { repositories { } dependencies { } }

Hope that helps

Shahar2k5 avatar Jan 26 '15 15:01 Shahar2k5

@Fi5t Thanks. It worked for me.

abhirb1 avatar Jan 31 '16 09:01 abhirb1

You can do the following:

  • Download the project from here: https://github.com/pardom/ActiveAndroid/archive/master.zip
  • Install gradle and dependencies with ./gradlew
  • Build the library with ./gradlew jar
  • Move the generated JAR (in build/libs/ActiveAndroid.jar) to your project's libs folder
  • Add the following to your build.gradle:
dependencies {
    compile files('libs/activeandroid-3.1.0.jar')
}

Tested on Mac OS X. If you're on Windows you should use the gradlew.bat file instead.

Thanks , this works for me. For CN developers,maybe the other solutions need VPN connnect.

mikite avatar Mar 28 '19 10:03 mikite

@mikite please, use Room =)

Fi5t avatar Mar 29 '19 07:03 Fi5t

@mikite please, use Room =)

fail to load this page.

mikite avatar Mar 29 '19 07:03 mikite

@mikite the page is OK. if you experience problems loading it, consult with your local Great Firewall agency.

naXa777 avatar Mar 31 '19 08:03 naXa777

ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.michaelpardo:activeandroid:3.1.0-SNAPSHOT. Done with all above solution remain same, can any one share the solid solution for this?

PrateekChaurasia avatar May 18 '20 17:05 PrateekChaurasia

I'm getting the same error but none of the suggested solutions worked for me

xplinter91 avatar May 18 '20 17:05 xplinter91