0

Good day, i am following this tutorial http://ddewaele.github.io/GoogleMapsV2WithActionBarSherlock/part5 where you have to use HttpTransport but for some reason, android-studio does not seem to find it. I have imported the libraries (some even unnecessary) that are needed but no success. here is my build.gradle:

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.6.+'
    }
}
apply plugin: 'android'

repositories {
    mavenCentral()
}

android {
    compileSdkVersion 17
    buildToolsVersion "19.0.1"

    defaultConfig {
        minSdkVersion 8
        targetSdkVersion 19
    }
}

dependencies {
    compile 'com.android.support:appcompat-v7:+'
    compile 'com.google.android.gms:play-services:4.+'
    compile 'com.google.http-client:google-http-client-android3:1.9.0-beta@jar'
    compile 'com.google.http-client:google-http-client:1.17.0-rc@jar'
    compile 'com.google.http-client:google-http-client-android:1.17.0-rc@jar'
    compile 'com.google.code.gson:gson:2.1@jar'
    compile 'com.fasterxml.jackson.core:jackson-core:2.1.3@jar'
    compile 'org.codehaus.jackson:jackson-core-asl:1.9.4@jar'
    compile 'com.google.code.findbugs:jsr305:1.3.9@jar'
    compile 'com.google.protobuf:protobuf-java:2.2.0@jar'
    compile 'com.google.http-client:google-http-client:1.10.3-beta@jar'
    compile 'com.google.http-client:google-http-client-android2:1.10.3-beta@jar'
    compile 'com.google.http-client:google-http-client-android3:1.10.3-beta@jar'
    compile 'com.google.http-client:google-http-client:1.10.3-beta@jar'
    compile 'com.google.api-client:google-api-client:1.10.3-beta@jar'
    compile 'com.google.api-client:google-api-client-android2:1.10.3-beta@jar'
    compile 'com.google.oauth-client:google-oauth-client:1.11.0-beta@jar'
    compile 'com.google.guava:guava:11.0.1@jar'
}

anything am not importing or what could be wrong?.. many Thanks in Advance.

irobotxx
  • 5,963
  • 11
  • 62
  • 91
  • 1
    What version of Android Studio? Also, what do you mean by "it does not seem to find it?" Please be more specific about the problems you're seeing, and include the complete error output. – Scott Barta Feb 28 '14 at 16:15
  • @ScottBarta what i mean is that, i get compiler errors not run time error. i have tried to explicit import com.google.api.client.http.HttpTransport, but ".http.HttpTransport" is not even found in my packages, so there must be something that is not added correctly. not just sure what? – irobotxx Feb 28 '14 at 16:38
  • What version of Android Studio? Actually I see by your build.gradle that you must be running something very old. You need to upgrade. – Scott Barta Feb 28 '14 at 16:39
  • possible duplicate of [Android Studio 0.4.2 suddenly cannot resolve symbols](http://stackoverflow.com/questions/21100688/android-studio-0-4-2-suddenly-cannot-resolve-symbols) – Scott Barta Feb 28 '14 at 16:40

1 Answers1

0

Though late, still writing wondering if can help other developers...

The HttpTransport class resides in google-http-client jar. As you have added this dependency in the build.gradle file as shown above, I guess either you don't have network connectivity or your gradle settings is set to offline.

You can download the jar files form https://developers.google.com/api-client-library/java/google-http-java-client/download Unzip the zipped file. Copy the required jar files to the project libs directory & add them as library.