ActiveAndroid
ActiveAndroid copied to clipboard
Gradle: Could not find com.michaelpardo:activeandroid:3.1.0-SNAPSHOT
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'
}
+1 culd not found, is there any solutions
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'slibs
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.
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 speaks the truth. Worked for me, thanks!
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?
@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
@Fi5t Thanks. It worked for me.
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'slibs
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 please, use Room =)
@mikite the page is OK. if you experience problems loading it, consult with your local Great Firewall agency.
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?
I'm getting the same error but none of the suggested solutions worked for me