简体   繁体   English

无法使AVD与Android Studio一起使用

[英]Can't get AVD working with Android Studio

I used to use the emulator frequently when I used Eclipse with little problems. 当我几乎没有问题地使用Eclipse时,我经常使用模拟器。 Now that I have been using Android Studio for about eight months I just now have need to use the emulator again for the first time with AS. 现在,我已经使用Android Studio大约八个月了,现在我第一次需要在AS中再次使用模拟器。

I can't get it to do anything. 我什么也做不了。 It just sits there and does nothing. 它只是坐在那里,什么也不做。 The same project runs just fine on both of my test phones (LG G4, Samsung Galaxy S3). 同一项目在我的两款测试手机(LG G4,三星Galaxy S3)上都可以正常运行。 The emulator displays, black screen with the word "android" showing. 模拟器显示黑屏,并显示单词“ android”。 it will sit there like that all day and do nothing. 它会整天坐在那里,什么也不做。 I built two other AVDs - same thing. 我还建立了另外两个AVD-同一件事。

The monitor window in AS shows the following... AS中的监视器窗口显示以下内容...

C:\\Users\\Gary\\AppData\\Local\\Android\\sdk\\tools\\emulator.exe -scale 0.25 -netdelay none -netspeed full -avd LG_G4_API_22 emulator: WARNING: Requested RAM size of 2048MB is too large for your environment, and is reduced to 1536MB. C:\\ Users \\ Gary \\ AppData \\ Local \\ Android \\ sdk \\ tools \\ emulator.exe -scale 0.25 -netdelay none -n​​etspeed full -avd LG_G4_API_22仿真器:警告:请求的2048MB RAM大小对于您的环境而言太大,并且是减少到1536MB。 emulator: device fd:944 HAXM is working and emulator runs in fast virt mode creating window 0 0 360 640 emulator: UpdateChecker: skipped version check 模拟器:设备fd:944 HAXM正在运行,并且模拟器在快速virt模式下运行,创建了窗口0 0 360 640模拟器:UpdateChecker:跳过了版本检查

My AVD specs are as follows... 我的AVD规格如下... 这里

my build.gradle is as follows... apply plugin: 'com.android.application' 我的build.gradle如下...应用插件:“ com.android.application”

android { compileSdkVersion 15 buildToolsVersion "22.0.1" android {compileSdkVersion 15 buildToolsVersion“ 22.0.1”

defaultConfig {
    applicationId "com.deanblakely.findmykids"
    minSdkVersion 15
    targetSdkVersion 22
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
    }
}

} }

dependencies { compile project(':library') compile project(':googleplayservices_lib') compile files('libs/gson-2.2.4.jar') compile 'com.android.support:support-v4:+' } Hope someone has a clue as to what's going on. 依赖项{编译项目(':library')编译项目(':googleplayservices_lib')编译文件('libs / gson-2.2.4.jar')编译'com.android.support:support-v4:+'}希望有人对正在发生的事情有一个线索。 Thanks, Dean 谢谢院长

验证您的SDK是否已安装或更新了Intel x86 Emulator Accelerator(HAXM),这可以带来真正的改变,还请记住,AVD创建的是模拟器而不是模拟器,因此它是在模拟真实设备,因此取决于您的PC处理器和RAM内存会影响在性能方面,Genymotion是一个不错的选择,因为它可以与Virtual Box一起使用

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

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