views:

303

answers:

3
+1  Q: 

missing packages

I'm a beginner in android and i tried running some code I got from the net. Android can't import the following:

import android.net.http.EventHandler;

import android.net.http.Headers;

import android.net.http.RequestQueue;

Are these packages not included in the sdk? Where can I get these packages?

A: 

According to the API docs, those classes aren't part of the SDK. If you're looking for classes to interact with HTTP, you might take a look at the docs for org.apache.http.

Erich Douglass
+1  A: 

Some tutorials out there are based on older versions of Android and haven't been updated as the SDK changes, this is probably what you are running into....similar thread where people have issues with same imports, there also a supposed work around here

curtisk
+1  A: 

Those classes are in the Android Open Source Project (AOSP) Sources but they're not included in the SDK from Google. If you really want those classes you could download the source tree with git.

However, since those classes aren't easily available you'd be better off looking for some different sample code to run.

Dave Webb