soda-android-sdk icon indicating copy to clipboard operation
soda-android-sdk copied to clipboard

Gradle Dependency

Open CDandu16 opened this issue 9 years ago • 7 comments

Does the Gradle Dependency not work? It doesn't seem to recognize the source.

CDandu16 avatar Jun 07 '15 04:06 CDandu16

It doesn't work. You have to import the project as a module in Android Studio. You may have to make some changes to the projects gradle file to get the import to be successful.

On Sun, Jun 7, 2015, 12:54 AM CDandu16 [email protected] wrote:

Does the Gradle Dependency not work? It doesn't seem to recognize the source.

— Reply to this email directly or view it on GitHub https://github.com/socrata/soda-android-sdk/issues/2.

cbdonohue avatar Jun 07 '15 13:06 cbdonohue

@cbdonohue Any insight into what needs to be updated in the gradle file? Glad to help figure out what needs fixing here.

chrismetcalf avatar Jun 11 '15 18:06 chrismetcalf

Any luck with the gradle dependency? I have been trying to add this API to my project and can't seem to get it to work. If the gradle dependency doesn't work, is there a way to make this an Android library instead of a project?

peacefulhuman avatar Dec 24 '16 21:12 peacefulhuman

Clone or download the project into a directory. Then create a new Android project and import the soda-android-sdk module.

I had to make the following changes to the build.gradle for the soda-android-sdk module:

buildscript {
    repositories {
        maven { url 'http://repo1.maven.org/maven2' }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.0'
    }
}

apply plugin: 'com.android.library'

dependencies {
    compile files('libs/android-async-http-1.4.2-66-g4b6eb97.jar')
    compile 'com.android.support:appcompat-v7:25.1.0'
    compile 'com.google.android.gms:play-services:10.0.1'
}

android {
    compileSdkVersion 25
    buildToolsVersion '25.0.1'

    defaultConfig {
        minSdkVersion 19
        targetSdkVersion 25
        testApplicationId "com.socrata.android.tests"
    }
}

You may also have to add the following to the Application tag of your manifest so it merges manifests correctly:

xmlns:tools="http://schemas.android.com/tools"
tools:replace="android:icon"

In your new application's build.gradle you will have to include the other module as a dependency: compile project(':soda-android-sdk')

I'm using Android Studio 2.3 Beta 1

cbdonohue avatar Jan 04 '17 16:01 cbdonohue

how do i import the soda-android-sdk module.

oscody avatar Nov 21 '17 18:11 oscody

Hi all Am i missing something or does the README's instructions not work> I'm new to programming and android and SODA. The instruction on adding 'com.socrata:android-soda-client:1.0-SNAPSHOT' to the app/module build.gradle doesnt work for me on android studio.

all help gratefully accepted!

zeuslawyer avatar Feb 20 '18 08:02 zeuslawyer

Updated to run on Android 3.5 #3

cbdonohue avatar Aug 27 '19 22:08 cbdonohue