简体   繁体   English

我无法在AVD中运行android应用程序

[英]I can't able to run the android application in AVD

I have multiple questions to ask. 我有多个问题要问。 I tried my best to find the solution but still confused. 我尽力找到解决方案,但仍然感到困惑。

1) I couldn't able to run the android app in in the avd. 1)我无法在avd中运行android应用。 Whenever I click the run as android application. 每当我单击“以Android方式运行”应用程序时。 Its only creating multiple avd but no avd is running my app. 它仅创建多个avd,但没有avd正在运行我的应用。 And I couldn't find any logcat messages. 而且我找不到任何logcat消息。 In the console its displaying these errors. 在控制台中显示这些错误。

[2014-04-17 09:12:42 - MyFirstApp] Android Launch!
[2014-04-17 09:12:42 - MyFirstApp] adb is running normally.
[2014-04-17 09:12:42 - MyFirstApp] Performing com.example.myfirstapp.MainActivity activity launch
[2014-04-17 09:12:42 - MyFirstApp] Automatic Target Mode: launching new emulator with compatible AVD 'MotoG'
[2014-04-17 09:12:42 - MyFirstApp] Launching a new emulator with Virtual Device 'MotoG'
[2014-04-17 09:13:47 - Emulator] WARNING: Data partition already in use. Changes will not persist!
[2014-04-17 09:13:47 - Emulator] WARNING: SD Card image already in use: C:\Users\Sanjay M\.android\avd\MotoG.avd/sdcard.img
[2014-04-17 09:13:47 - Emulator] WARNING: Cache partition already in use. Changes will not persist!
[2014-04-17 09:13:47 - Emulator] emulator: emulator window was out of view and was recentere
[2014-04-17 09:13:47 - Emulator]

2) Sometime the appcompat_v7 is not creating along with the project. 2)有时appcompat_v7不会与项目一起创建。 Is it normal? 正常吗

3) When I tried to create a Master flow activity its saying "This template requires a minimum SDK version of at least 11, and the current min version is 8" - How to update the SDK version. 3)当我尝试创建Master flow活动时,它说“此模板要求的最低SDK版本至少为11,而当前的最低版本为8”-如何更新SDK版本。

Thanks a lot in advance. 非常感谢。

<uses-sdk
    android:minSdkVersion="11"
    android:targetSdkVersion="19" />

add that in your manifest for setting min and target sdk 将其添加到清单中以设置min和target sdk

Ok, For point 1 : 好的,对于第1点:

Well As i thinks your application Target mode is by default selected as manual. 好吧,我认为您的应用程序目标模式默认情况下是手动选择的。

Select Run Tab in eclipse->Select Run Configurations -> In that select Target Tab ->Select Automatic instead of manual Click on Apply button and now hit run. 在eclipse中选择“运行”选项卡->“选择运行配置”->在其中,选择“目标”选项卡->“选择自动而不是手动”单击“应用”按钮,现在运行。

Now your app doesn't prompt for a device. 现在,您的应用不再提示您输入设备。

For Point 2: 对于第2点:

appcompat_v7 is a support library in android, so if you already have this library some where in the workspace then it would not be created each time. appcompat_v7是android中的支持库,因此,如果您已经在工作空间中的某个位置拥有此库,则不会每次都创建该库。

for more see here . 有关更多信息,请参见此处

For point 3 : 对于第3点:

While creating the new project set the minimum sdk version to 11 in fourth one column from top. 在创建新项目时,请从顶部第四栏中将最低SDK版本设置为11。

see screen shot for help: (Note this pic only for demo, where to set minimum sdk version) 请参阅屏幕截图以获取帮助:(请注意此图片仅用于演示,在此处可以设置最低sdk版本)

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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