简体   繁体   中英

Cannot emulate a device or load app into phone in Android Studio 0.8.1

I'm using Android Studio 0.8.1 and after creating a new project (the basic "hello world"), I cannot get the program to load to my phone or emulate. I'm also at the beginner level of android development so keep that in mind.

Steps:

  1. Open Android Studio
  2. Select "New Project"
  3. Naming it "Test4"
  4. Setting Minimum SDK to "API 8:Android 2.2 (Froyo)
  5. Selecting "Blank Activity"
  6. Click Finish. --Project builds--
  7. Click the run arrow.
  8. In the "Choose Device" window, I see my HTC One M8 with Android 4.4.2(API19)as a running device, however the column labeled "Compatible" displays: "No, minSdk(API20, L preview!= deviceSdk(API19).

Why is this the case when I selected API 8 as the minimum SDK?

image here: Compatibility Issue

Emulator attempt:

When trying to use the emulator I seemed to have similar issues others have had, but the standard fixes don't seem to be working for me.

When I launch the emulator, There are no AVDs in the list so attempted to create one. The Target pull down list only contains "Android L(Preview) - API Level L" The "CPU/ABI:" only displays "No system images installed for this target." Using the Android SDK Manager, I installed all items for "Android L(API20, L preview), Android 4.4@(API20), Android 4.4.2(API19) except "glass Development Kit Preview." All Items under Android 2.2(API8). Installed Android SDK Build-tools from 19 to 23.0.2. Again, not sure about what needs to be installed.

If your ADT version is 23.0.2 and you have selected a blank activity then you will neither have any activity xml files created under the res/layout folder nor you will have the respective .java file created under the src folder. So if you do not have a java file in the src folder it is obvious that your app cannot be installed on the Emulator.

This is a bug in this particular ADT version from Google I suppose. And nothing to worry with your minSDK.

https://code.google.com/p/android/issues/detail?id=72419

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM