lulala
lulala

Reputation: 647

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?

Upvotes: 2

Views: 1471

Answers (3)

David Webb
David Webb

Reputation: 193774

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.

Upvotes: 1

curtisk
curtisk

Reputation: 20175

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

Upvotes: 1

Erich Douglass
Erich Douglass

Reputation: 52002

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.

Upvotes: 0

Related Questions