Jack Ritter
Jack Ritter

Reputation: 81

Android LicenseChecker from Emulator

I have been trying to run the Emulator (Android 2.2 - Level 8) with Google APIs level 9 to test my License Checker implementation to no avail. This is as recommended at: http://developer.android.com/guide/publishing/licensing.html#test-env

It runs fine on the device, but not on the emulator.

On my AVD emulator, I don't have the Market installed. So I am not sure if the documentation is wrong because the architecture does show the dependency on the Market.

Has anyone had any luck running the LVL code on the emulator?

Thanks.

Upvotes: 0

Views: 1166

Answers (1)

Matt
Matt

Reputation: 328

Sounds like you are trying to run Emulator with a target of "Android 2.2 - API Level 8". In order to get the LicenseChecker to run, the target for your Virtual Device needs to actually be "Google APIs (Google Inc.) - API Level 8". This will still open up the emulator for 2.2, but will have the Google APIs ready to use.

From the Licensing page:

To set up an emulator for adding licensing to an application, follow these steps:

  1. Launch the Android SDK and AVD Manager.
  2. In the Available Packages panel, select and download the SDK component "Google APIs (Google Inc.) - API Level 8" (or higher) from the SDK repository, as shown in the figure above. When the download is complete, use the Android SDK and AVD Manager to create a new AVD based on that component, described next.
  3. In the Virtual Devices panel of the Android SDK and AVD Manager, click New and set the configuration details for the new AVD.
  4. In the dialog that appears, assign a descriptive name to the AVD and then use the "Target" menu to choose the "Google APIs (Google Inc.) - API Level 8" as the system image to run on the new AVD. Set the other configuration details as needed and then click Create AVD to finish. The SDK tools create the new AVD configuration, which then appears in the list of available Android Virtual Devices.

Upvotes: 2

Related Questions