Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5985111
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:28:52+00:00 2026-05-22T22:28:52+00:00

I’m creating an Android app and trying to use Google Places API through Google

  • 0

I’m creating an Android app and trying to use Google Places API through Google APIs Client. I’ve been following this example:
http://ddewaele.blogspot.com/2011/05/introducing-google-places-api.html

I’m having problems creating a HTTP Transport Object to use in creating the HTTP Request Factory. Everything compiles fine in eclipse, but when I debug while running on my phone, I get a classnotfound on the first line here:

HttpTransport transport = new ApacheHttpTransport();
HttpRequestFactory httpRequestFactory = createRequestFactory(transport);
public static HttpRequestFactory createRequestFactory(HttpTransport transport) {
    return transport.createRequestFactory(new HttpRequestInitializer() {
        @Override
        public void initialize(HttpRequest request) throws IOException {
            request.headers.authorization = "...";
        }
    });
}

According to the JavaDoc for the HTTP Transport Class:

Android:

  • Starting with SDK 2.3, strongly recommended to use
    com.google.api.client.javanet.NetHttpTransport. Their Apache HTTP Client
    implementation is not as well maintained.
  • For SDK 2.2 and earlier, use com.google.api.client.apache.ApacheHttpTransport.
    com.google.api.client.javanet.NetHttpTransport
    is not recommended due to some bugs in
    the Android SDK implementation of
    HttpURLConnection.

I’m running on 2.2, so I tried using the ApacheHTTPTransport. I’ve also tried the NetHTTPTransport, but I get the same thing (classnotfound).

Any ideas/examples?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T22:28:52+00:00Added an answer on May 22, 2026 at 10:28 pm

    In order to run the Places API in an Android environment using the Google APIs Client, you’ll need to have the following dependencies in your Android project :

    • M2_REPO/commons-codec/commons-codec/1.3/commons-codec-1.3.jar
    • M2_REPO/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar
    • M2_REPO/com/google/api/client/google-api-client/1.4.1-beta/google-api-client-1.4.1-beta.jar
    • M2_REPO/com/google/api/client/google-api-client-googleapis/1.4.1-beta/google-api-client-googleapis-1.4.1-beta.jar
    • M2_REPO/com/google/code/gson/gson/1.6/gson-1.6.jar
    • M2_REPO/com/google/guava/guava/r08/guava-r08.jar
    • M2_REPO/org/apache/httpcomponents/httpclient/4.0.3/httpclient-4.0.3.jar
    • M2_REPO/org/apache/httpcomponents/httpcore/4.0.1/httpcore-4.0.1.jar
    • M2_REPO/org/codehaus/jackson/jackson-core-asl/1.6.5/jackson-core-asl-1.6.5.jar
    • M2_REPO/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
Seemingly simple, but I cannot find anything relevant on the web. What is the
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I have a French site that I want to parse, but am running into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.