Problems running applications on Android 2.0 compiled on Android SDK 2.3

It seems that major changes have been made to the SDK 2.3 that make applications compiled on it work on Android 2.0 devices. (Despite the fact that Android 2.0 officially left, I, unfortunately, got stuck on a heap of Motorola Milestones, which I received from Expansys, which have not yet received OTR updates).

The problem seems to be related to resources such as those mentioned here , however on device 2.0 instead of 1.6 or an earlier device. I can put all resources in /res/drawable/, however I want hdpi versions to appear instead of mdpi versions (in my opinion, this is the default value for /res/drawable/).

I decided that I could just use an old copy of the SDK (2.2 SDK could make apks that my milestones were happy), but I can no longer find the download link.

Are there any suggestions on how I can get hdpi graphics on device 2.0?

(In parallel, I try to contact Motorola and get devices updated via OTR. Unfortunately, many of them are deployed in the field and cannot be updated via USB).

Playback Steps

  • Install Android SDK 2.3
  • In Eclipse, create a new Android project. Set your target to 1.6 or higher.
  • Change the default main.xmlto add: <ImageView android:src="@drawable/icon" android:layout_width="wrap_content" android:layout_height="wrap_content" />anywhere.
  • Create an example, then run using the Android 2.0 VM.

Expected results

5: the application will load. The icon may or may not appear depending on main.xml.

actual results

5: , . stacktrace.

+3
3

Android, Android, 0% , , . , : ; .

0

SDK AVD/SDK. Eclipse Window- > Android SDK AVD Manager. " ", SDK, .

, , API , SDK. HPI, Android 2.0. , Project- > Clean , .

+2

Check also how you should upgrade to 2.3 using Eclipse:

http://ggomeze.com/2010/12/09/updating-eclipse-to-gingerbread

0
source

Source: https://habr.com/ru/post/1779058/


All Articles