After updating my Android SDK tools today to 25.3.1, the emulator won't run anymore.
在今天将我的Android SDK工具更新到25.3.1之后,模拟器将不再运行。
I can open the AVD Manager. When I hit "Play" on one of the emulators on the list, I see the bar below on Android Studio
我可以打开AVD Manager。当我在列表中的某个模拟器上点击“播放”时,我会在Android Studio上看到下面的栏
But then after the progress bar reaches the end, nothing happens.
但是在进度条结束后,没有任何反应。
I see in the release notes that the latest update brought changes to the emulator so I'm wondering if that's a bug or I'm missing something about that.
我在发行说明中看到最新的更新给模拟器带来了变化,所以我想知道这是一个bug还是我错过了一些关于它的东西。
I'm using Android Studio 2.3.
我正在使用Android Studio 2.3。
Any ideas?
12 个解决方案
#1
21
I ran into the same problem after upgrading. I can't figure out what's causing the configuration problem but I did figure out a workaround.
升级后我遇到了同样的问题。我无法弄清楚导致配置问题的原因,但我确实找到了解决方法。
First, I tried to launch the emulator from the command line:
首先,我尝试从命令行启动模拟器:
$ emulator @<name_avd_image>
emulator: ERROR: This AVD's configuration is missing a kernel file! Please ensure the file "kernel-ranchu" is in the same location as your system image.
emulator: ERROR: ANDROID_SDK_ROOT is defined (<android>/sdk) but cannot find kernel file in <android>/sdk/system-images/ sub directories
You can get more information if you run emulator
with the -verbose
flag. I tried re-installing the system image (e.g. Android API 25 x86 w/ Google APIs), Android Emulator 25.3.1, and re-creating the AVD but nothing worked.
如果使用-verbose标志运行模拟器,则可以获得更多信息。我尝试重新安装系统映像(例如Android API 25 x86 w / Google API),Android Emulator 25.3.1,并重新创建AVD但没有任何效果。
Finally as a workaround, I just copied all of the system files from the SDK system images directory into the AVD directory:
最后,作为一种解决方法,我只是将SDK系统映像目录中的所有系统文件复制到AVD目录中:
Example: Pixel XL (Android API 25 x86 w/ Google APIs)
SOURCE: <android>
/sdk/system-images/android-25/google_apis/x86/
DESTINATION: ~/.android/avd/Pixel_XL_API_25.avd/
示例:Pixel XL(Android API 25 x86 w / Google API)消息来源:
After that the emulator started right up. It's not ideal, but this was blocking my development so I had to get the emulator up and running again. I hope someone else will be able to figure out what broke in the configuration.
之后,模拟器启动了。这不是理想的,但这阻碍了我的开发,所以我不得不让模拟器重新启动并运行。我希望其他人能够弄清楚配置中出现了什么。
UPDATE: Figured out the configuration problem!
更新:找出配置问题!
I noticed I periodically was seeing the console error "Your emulator is out of date, please update by launching Android Studio:" so I decided to check:
我注意到我定期看到控制台错误“你的模拟器已经过时,请通过启动Android Studio更新:”所以我决定检查:
$ which emulator
<$ANDROID_SDK_ROOT>/tools/emulator
With help from this thread:
在这个帖子的帮助下:
The problem is there are two emulators: one in
$ANDROID_SDK_ROOT/tools
, another one in$ANDROID_SDK_ROOT/emulator
. The one in$ANDROID_SDK_ROOT/tools
cannot start. Place$ANDROID_SDK_ROOT/emulator
before$ANDROID_SDK_ROOT/tools
in your$PATH
variable, it should fix the problem.问题是有两个模拟器:一个在$ ANDROID_SDK_ROOT / tools中,另一个在$ ANDROID_SDK_ROOT /模拟器中。 $ ANDROID_SDK_ROOT /工具中的那个无法启动。在$ PATH变量中的$ ANDROID_SDK_ROOT / tools之前放置$ ANDROID_SDK_ROOT / emulator,它应该解决问题。
NOTE: For most Mac users, you can edit your ~/.bash_profile
to change these settings and then run $source ~/.bash_profile
to load the updates. In my particular case, I also had old values for $ANDROID_HOME that I had to clear out.
注意:对于大多数Mac用户,您可以编辑〜/ .bash_profile来更改这些设置,然后运行$ source~ / .bash_profile来加载更新。在我的特殊情况下,我也有$ ANDROID_HOME的旧值,我必须清除。
#2
20
The real problem, at least over Ubuntu 16.10 and 17.04 and Andoid Studio 2.4 Preview 7 (but could happen with any Debian derivative and previous versions of Android Studio), is that Google is distributing a non working libstdc++ library with the emulator tools. They're distributing 6.0.18 version, but i found that the working one is 6.0.22.
真正的问题,至少在Ubuntu 16.10和17.04以及Andoid Studio 2.4 Preview 7(但可能发生在任何Debian衍生产品和以前版本的Android Studio上),是Google正在使用模拟器工具分发一个不工作的libstdc ++库。他们正在分发6.0.18版本,但我发现工作版本是6.0.22。
EDIT: There are reports that 6.0.21 version of libstdc++ works as well as 6.0.22.
编辑:有报告称,6.0.21版本的libstdc ++和6.0.22一样。
So, you have 2 options:
所以,你有两个选择:
Option 1
rm
the previous non working Google's libs in /yoursdkpàth/emulator/lib64/libstdc++
在/yoursdkpàth/ emulator / lib64 / libstdc ++中以前的非工作Google库
Download and extract libs from libstdc++ official package in /yoursdkpàth/emulator/lib64/libstdc++
从/yoursdkpàth/ emulator / lib64 / libstdc ++中的libstdc ++官方软件包下载并解压缩libs
Don't try to install the .deb, extract the files/binaries from inside it (the 2 binaries are in a folder named "lib") and manuallly copy them on the recommended path.
不要尝试安装.deb,从中提取文件/二进制文件(2个二进制文件位于名为“lib”的文件夹中),并在推荐的路径上手动复制它们。
Option 2
Create a simlink to the lib distributed with Ubuntu, which already is 6.0.22 version
创建一个与Ubuntu一起发布的lib的simlink,它已经是6.0.22版本了
cd ~/Android/Sdk/emulator/lib64/libstdc++/
mv libstdc++.so.6 libstdc++.so.6.bak
mv libstdc++.so.6.0.18 libstdc++.so.6.0.18.bak
ln -sf /usr/lib/x86_64-linux-gnu/libstdc++.so.6 ~/Android/Sdk/emulator/lib64/libstdc++/libstdc++.so.6
ln -sf /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22 ~/Android/Sdk/emulator/lib64/libstdc++/libstdc++.so.6.0.22
IMPORTANT 1: As Google seems to be not aware of the problem, on every update they make to the Android Emulator package in Android Studio, they break the funcionality replacing your working SDK C++ libs with the broken/older ones. The solution is to repeat any of the above procedures.
重要提示1:由于谷歌似乎并未意识到这个问题,因此在他们对Android Studio中的Android Emulator软件包进行的每次更新中,他们都会破坏功能,将您的工作SDK C ++库替换为破碎/旧版本。解决方案是重复上述任何程序。
IMPORTANT 2: This is only valid if your AVDs are configured for use your PC GPU as host for video accelaration (Hardware GLES 2.0). Selecting Sofware GLES 2.0 on your AVD will work without any of the suggested changes, but your emulator will turn painfully slow.
重要事项2:仅当您的AVD配置为使用PC GPU作为视频加速主机(硬件GLES 2.0)时,此功能才有效。在您的AVD上选择Sofware GLES 2.0可以在没有任何建议的更改的情况下工作,但您的模拟器将变得非常缓慢。
#3
8
Have you check the Android emulator installed in the **SDK Tools?
您是否检查了** SDK工具中安装的Android模拟器?
Go to Setting-> sdk-tools.
转到Setting-> sdk-tools。
See whether Android is installed or not.
查看是否安装了Android。
I have face same problem. when I checked the SDK Tools, I found that the Android emulator was not installed.
我面临同样的问题。当我检查SDK工具时,我发现没有安装Android模拟器。
#4
6
The libstdc++.so.6
is the cause (as pointed out by @doruMarinau); Android Studio 2.3 moved the file to a new folder your_sdk/emulator/lib64
.
libstdc ++。so.6是原因(正如@doruMarinau所指出的那样); Android Studio 2.3将文件移动到新文件夹your_sdk / emulator / lib64。
If using Linux, create a symlink for it:
如果使用Linux,请为其创建符号链接:
$ ln -sf /usr/lib/libstdc++.so.6 /your_sdk/emulator/lib64/libstdc++/libstdc++.so.6
#5
3
The solution is: Tools - Android - Sdk manager tab Sdk tools install emulator 25.3.1
解决方案是:工具 - Android - Sdk管理器选项卡Sdk工具安装模拟器25.3.1
#6
#7
1
It’s a libGL error and libstdc++ issue. Cannot launch AVD in emulator. It’s a know bug and you can easily beat it with some simple steps.
这是一个libGL错误和libstdc ++问题。无法在模拟器中启动AVD。这是一个知道错误,您可以通过一些简单的步骤轻松击败它。
I have tested this solution on a Ubuntu 16.10 64bit
我在Ubuntu 16.10 64bit上测试了这个解决方案
Solution:
$adb kill-server
$adb start-server
After this start your emulator from the Android studio. If this doesn't work then go ahead for the next solution.
在此之后从Android工作室启动您的模拟器。如果这不起作用,那么继续下一个解决方案。
Alternative solution:
First, install some packages and libs:
首先,安装一些包和库:
$sudo apt-get install lib64stdc++6:i386
$sudo apt-get install mesa-utils
Second, tweak some links:
其次,调整一些链接:
$ cd YOURPATH/Android/Sdk/tools/lib64
$ mv libstdc++/ libstdc++.bak
$ ln -s /usr/lib64/libstdc++.so.6 libstdc++
Third, relaunch your AVD device and test it.
第三,重新启动您的AVD设备并进行测试。
#8
1
Go to Sdk/emulator/lib64/libstdc++
move libstdc++.so.6
and libstdc++.so.6.0.18
to myfolder (I created this) (or any other location) as backup and copy libstdc++.so.6
, libstdc++.so.6.0.21
from usr/lib64
; try again to launch your virtual device.
转到sdk / emulator / lib64 / libstdc ++ move libstdc ++。so.6和libstdc ++。so.6.0.18到myfolder(我创建了这个)(或任何其他位置)作为备份并复制libstdc ++。so.6,libstdc ++。so。来自usr / lib64的6.0.21;再次尝试启动您的虚拟设备。
#9
0
It's been driving me nuts for the last few days. Here's what worked for me:
最近几天这让我疯了。这对我有用:
ANDROID_HOME, ANDROID_SDK_ROOT
variables in "System Environment Variables" were different from Android Studio -> Settings -> Android SDK Location
. So when I changed the environment variables, AVD started!
“系统环境变量”中的ANDROID_HOME,ANDROID_SDK_ROOT变量与Android Studio - >设置 - > Android SDK位置不同。所以当我改变环境变量时,AVD就开始了!
(After changed the environment variable, you should restart the Android Studio)
(更改环境变量后,应重新启动Android Studio)
#10
0
The only solution which worked for me, was to install following missing libraries:
对我有用的唯一解决方案是安装以下缺少的库:
$sudo apt-get install lib64stdc++6:i386
$sudo apt-get install mesa-utils
Once you have them, update the one there in sdk's emulator with these as following:
获得它们后,使用以下内容更新sdk模拟器中的那个:
$ ln -sf /usr/lib/libstdc++.so.6 /home/[YOUR_SYSTEM_USERNAME]/emulator/lib64/libstdc++/libstdc++.so.6
Launch your emulator again and it will work just fine.
再次启动您的模拟器,它将正常工作。
#11
0
As of this release, the Android Emulator will be released separately from the SDK Tools. so just install android Emulator using sdk tools in your android studio
截至此版本,Android Emulator将与SDK Tools分开发布。所以只需在Android工作室中使用sdk工具安装android Emulator
#12
0
My problem was ANDROID_SDK_HOME
pointing to d:\.android
instead of d:\
. Could not find the images anymore.
我的问题是ANDROID_SDK_HOME指向d:\ .android而不是d:\。找不到图像了。
#1
21
I ran into the same problem after upgrading. I can't figure out what's causing the configuration problem but I did figure out a workaround.
升级后我遇到了同样的问题。我无法弄清楚导致配置问题的原因,但我确实找到了解决方法。
First, I tried to launch the emulator from the command line:
首先,我尝试从命令行启动模拟器:
$ emulator @<name_avd_image>
emulator: ERROR: This AVD's configuration is missing a kernel file! Please ensure the file "kernel-ranchu" is in the same location as your system image.
emulator: ERROR: ANDROID_SDK_ROOT is defined (<android>/sdk) but cannot find kernel file in <android>/sdk/system-images/ sub directories
You can get more information if you run emulator
with the -verbose
flag. I tried re-installing the system image (e.g. Android API 25 x86 w/ Google APIs), Android Emulator 25.3.1, and re-creating the AVD but nothing worked.
如果使用-verbose标志运行模拟器,则可以获得更多信息。我尝试重新安装系统映像(例如Android API 25 x86 w / Google API),Android Emulator 25.3.1,并重新创建AVD但没有任何效果。
Finally as a workaround, I just copied all of the system files from the SDK system images directory into the AVD directory:
最后,作为一种解决方法,我只是将SDK系统映像目录中的所有系统文件复制到AVD目录中:
Example: Pixel XL (Android API 25 x86 w/ Google APIs)
SOURCE: <android>
/sdk/system-images/android-25/google_apis/x86/
DESTINATION: ~/.android/avd/Pixel_XL_API_25.avd/
示例:Pixel XL(Android API 25 x86 w / Google API)消息来源:
After that the emulator started right up. It's not ideal, but this was blocking my development so I had to get the emulator up and running again. I hope someone else will be able to figure out what broke in the configuration.
之后,模拟器启动了。这不是理想的,但这阻碍了我的开发,所以我不得不让模拟器重新启动并运行。我希望其他人能够弄清楚配置中出现了什么。
UPDATE: Figured out the configuration problem!
更新:找出配置问题!
I noticed I periodically was seeing the console error "Your emulator is out of date, please update by launching Android Studio:" so I decided to check:
我注意到我定期看到控制台错误“你的模拟器已经过时,请通过启动Android Studio更新:”所以我决定检查:
$ which emulator
<$ANDROID_SDK_ROOT>/tools/emulator
With help from this thread:
在这个帖子的帮助下:
The problem is there are two emulators: one in
$ANDROID_SDK_ROOT/tools
, another one in$ANDROID_SDK_ROOT/emulator
. The one in$ANDROID_SDK_ROOT/tools
cannot start. Place$ANDROID_SDK_ROOT/emulator
before$ANDROID_SDK_ROOT/tools
in your$PATH
variable, it should fix the problem.问题是有两个模拟器:一个在$ ANDROID_SDK_ROOT / tools中,另一个在$ ANDROID_SDK_ROOT /模拟器中。 $ ANDROID_SDK_ROOT /工具中的那个无法启动。在$ PATH变量中的$ ANDROID_SDK_ROOT / tools之前放置$ ANDROID_SDK_ROOT / emulator,它应该解决问题。
NOTE: For most Mac users, you can edit your ~/.bash_profile
to change these settings and then run $source ~/.bash_profile
to load the updates. In my particular case, I also had old values for $ANDROID_HOME that I had to clear out.
注意:对于大多数Mac用户,您可以编辑〜/ .bash_profile来更改这些设置,然后运行$ source~ / .bash_profile来加载更新。在我的特殊情况下,我也有$ ANDROID_HOME的旧值,我必须清除。
#2
20
The real problem, at least over Ubuntu 16.10 and 17.04 and Andoid Studio 2.4 Preview 7 (but could happen with any Debian derivative and previous versions of Android Studio), is that Google is distributing a non working libstdc++ library with the emulator tools. They're distributing 6.0.18 version, but i found that the working one is 6.0.22.
真正的问题,至少在Ubuntu 16.10和17.04以及Andoid Studio 2.4 Preview 7(但可能发生在任何Debian衍生产品和以前版本的Android Studio上),是Google正在使用模拟器工具分发一个不工作的libstdc ++库。他们正在分发6.0.18版本,但我发现工作版本是6.0.22。
EDIT: There are reports that 6.0.21 version of libstdc++ works as well as 6.0.22.
编辑:有报告称,6.0.21版本的libstdc ++和6.0.22一样。
So, you have 2 options:
所以,你有两个选择:
Option 1
rm
the previous non working Google's libs in /yoursdkpàth/emulator/lib64/libstdc++
在/yoursdkpàth/ emulator / lib64 / libstdc ++中以前的非工作Google库
Download and extract libs from libstdc++ official package in /yoursdkpàth/emulator/lib64/libstdc++
从/yoursdkpàth/ emulator / lib64 / libstdc ++中的libstdc ++官方软件包下载并解压缩libs
Don't try to install the .deb, extract the files/binaries from inside it (the 2 binaries are in a folder named "lib") and manuallly copy them on the recommended path.
不要尝试安装.deb,从中提取文件/二进制文件(2个二进制文件位于名为“lib”的文件夹中),并在推荐的路径上手动复制它们。
Option 2
Create a simlink to the lib distributed with Ubuntu, which already is 6.0.22 version
创建一个与Ubuntu一起发布的lib的simlink,它已经是6.0.22版本了
cd ~/Android/Sdk/emulator/lib64/libstdc++/
mv libstdc++.so.6 libstdc++.so.6.bak
mv libstdc++.so.6.0.18 libstdc++.so.6.0.18.bak
ln -sf /usr/lib/x86_64-linux-gnu/libstdc++.so.6 ~/Android/Sdk/emulator/lib64/libstdc++/libstdc++.so.6
ln -sf /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22 ~/Android/Sdk/emulator/lib64/libstdc++/libstdc++.so.6.0.22
IMPORTANT 1: As Google seems to be not aware of the problem, on every update they make to the Android Emulator package in Android Studio, they break the funcionality replacing your working SDK C++ libs with the broken/older ones. The solution is to repeat any of the above procedures.
重要提示1:由于谷歌似乎并未意识到这个问题,因此在他们对Android Studio中的Android Emulator软件包进行的每次更新中,他们都会破坏功能,将您的工作SDK C ++库替换为破碎/旧版本。解决方案是重复上述任何程序。
IMPORTANT 2: This is only valid if your AVDs are configured for use your PC GPU as host for video accelaration (Hardware GLES 2.0). Selecting Sofware GLES 2.0 on your AVD will work without any of the suggested changes, but your emulator will turn painfully slow.
重要事项2:仅当您的AVD配置为使用PC GPU作为视频加速主机(硬件GLES 2.0)时,此功能才有效。在您的AVD上选择Sofware GLES 2.0可以在没有任何建议的更改的情况下工作,但您的模拟器将变得非常缓慢。
#3
8
Have you check the Android emulator installed in the **SDK Tools?
您是否检查了** SDK工具中安装的Android模拟器?
Go to Setting-> sdk-tools.
转到Setting-> sdk-tools。
See whether Android is installed or not.
查看是否安装了Android。
I have face same problem. when I checked the SDK Tools, I found that the Android emulator was not installed.
我面临同样的问题。当我检查SDK工具时,我发现没有安装Android模拟器。
#4
6
The libstdc++.so.6
is the cause (as pointed out by @doruMarinau); Android Studio 2.3 moved the file to a new folder your_sdk/emulator/lib64
.
libstdc ++。so.6是原因(正如@doruMarinau所指出的那样); Android Studio 2.3将文件移动到新文件夹your_sdk / emulator / lib64。
If using Linux, create a symlink for it:
如果使用Linux,请为其创建符号链接:
$ ln -sf /usr/lib/libstdc++.so.6 /your_sdk/emulator/lib64/libstdc++/libstdc++.so.6
#5
3
The solution is: Tools - Android - Sdk manager tab Sdk tools install emulator 25.3.1
解决方案是:工具 - Android - Sdk管理器选项卡Sdk工具安装模拟器25.3.1
#6
2
This worked for me:
这对我有用:
Go to AVD Manager, then, in the Actions column, click on the arrow that points dawn and select "Wipe Data". After this, try to run the emulator.
转到AVD Manager,然后在Actions列中,单击指向dawn的箭头并选择“Wipe Data”。在此之后,尝试运行模拟器。
#7
1
It’s a libGL error and libstdc++ issue. Cannot launch AVD in emulator. It’s a know bug and you can easily beat it with some simple steps.
这是一个libGL错误和libstdc ++问题。无法在模拟器中启动AVD。这是一个知道错误,您可以通过一些简单的步骤轻松击败它。
I have tested this solution on a Ubuntu 16.10 64bit
我在Ubuntu 16.10 64bit上测试了这个解决方案
Solution:
$adb kill-server
$adb start-server
After this start your emulator from the Android studio. If this doesn't work then go ahead for the next solution.
在此之后从Android工作室启动您的模拟器。如果这不起作用,那么继续下一个解决方案。
Alternative solution:
First, install some packages and libs:
首先,安装一些包和库:
$sudo apt-get install lib64stdc++6:i386
$sudo apt-get install mesa-utils
Second, tweak some links:
其次,调整一些链接:
$ cd YOURPATH/Android/Sdk/tools/lib64
$ mv libstdc++/ libstdc++.bak
$ ln -s /usr/lib64/libstdc++.so.6 libstdc++
Third, relaunch your AVD device and test it.
第三,重新启动您的AVD设备并进行测试。
#8
1
Go to Sdk/emulator/lib64/libstdc++
move libstdc++.so.6
and libstdc++.so.6.0.18
to myfolder (I created this) (or any other location) as backup and copy libstdc++.so.6
, libstdc++.so.6.0.21
from usr/lib64
; try again to launch your virtual device.
转到sdk / emulator / lib64 / libstdc ++ move libstdc ++。so.6和libstdc ++。so.6.0.18到myfolder(我创建了这个)(或任何其他位置)作为备份并复制libstdc ++。so.6,libstdc ++。so。来自usr / lib64的6.0.21;再次尝试启动您的虚拟设备。
#9
0
It's been driving me nuts for the last few days. Here's what worked for me:
最近几天这让我疯了。这对我有用:
ANDROID_HOME, ANDROID_SDK_ROOT
variables in "System Environment Variables" were different from Android Studio -> Settings -> Android SDK Location
. So when I changed the environment variables, AVD started!
“系统环境变量”中的ANDROID_HOME,ANDROID_SDK_ROOT变量与Android Studio - >设置 - > Android SDK位置不同。所以当我改变环境变量时,AVD就开始了!
(After changed the environment variable, you should restart the Android Studio)
(更改环境变量后,应重新启动Android Studio)
#10
0
The only solution which worked for me, was to install following missing libraries:
对我有用的唯一解决方案是安装以下缺少的库:
$sudo apt-get install lib64stdc++6:i386
$sudo apt-get install mesa-utils
Once you have them, update the one there in sdk's emulator with these as following:
获得它们后,使用以下内容更新sdk模拟器中的那个:
$ ln -sf /usr/lib/libstdc++.so.6 /home/[YOUR_SYSTEM_USERNAME]/emulator/lib64/libstdc++/libstdc++.so.6
Launch your emulator again and it will work just fine.
再次启动您的模拟器,它将正常工作。
#11
0
As of this release, the Android Emulator will be released separately from the SDK Tools. so just install android Emulator using sdk tools in your android studio
截至此版本,Android Emulator将与SDK Tools分开发布。所以只需在Android工作室中使用sdk工具安装android Emulator
#12
0
My problem was ANDROID_SDK_HOME
pointing to d:\.android
instead of d:\
. Could not find the images anymore.
我的问题是ANDROID_SDK_HOME指向d:\ .android而不是d:\。找不到图像了。