在Android 1.5.1工作室和AVD管理器安装到自定义位置仿真器将无法运行 [英] AVD Manager on Android Studio 1.5.1 and install to a custom location emulator won't run

查看:461
本文介绍了在Android 1.5.1工作室和AVD管理器安装到自定义位置仿真器将无法运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装的Andr​​oid工作室(1.5.1 - 见编译细节图片)。

在安装我选择自定义选项,所以我可以安装一个特定的路径。
我知道我的%SystemDrive%指向了一个网络位置,我想安装到我的本地磁盘上。

所以,这意味着,在默认情况下,该应用程序会一直安装到:
\\ networkpath \\用户\\ MyUserName输入\\ Android的\\ SDK

不过,我既然选择了定制安装我选择了一个本地路径:
C:\\用户\\名为myUsername \\ Android的\\ SDK

项目创建和打造,做工精细

一切似乎安装罚款,我能够创建一个新的项目,并没有任何问题建立它。

然而,当我试图运行内置,然后基本上是失败的默默。
模拟器从来没有出现过,也没有发生错误。
Android的显示器只是显示一个消息,说明没有连接的设备检测。
AVD管理器

幸运的是我知道了检查,看看与模拟器发生了什么,我打开了AVD管理一下。
列出的装置显示错误。
我右键单击该设备并选择查​​看详细信息。
这时候的AVD经理表明,它正试图从网络路径看,即使我在自定义安装改变了这个。
\\ networkPath \\用户\\ MyUserName输入\\ Windows.android \\ AVD \\ Nexus4.avd

\\ networkPath \\用户\\ MyUserName输入\\ Windows.android \\ AVD \\ Nexus4.ini

编辑注册表

我闭上Android的工作室。然后我打开注册表编辑器,在编辑的值:
 HKLM \\ SOFTWARE \\微软\\的Windows NT \\ CURRENTVERSION \\ ProfileList文件
原本看起来像下面这样:

和改变他们,让他们都直接指向了C:\\​​驱动器(而非%SYSTEMDRIVE%)

环境变量:ANDROID_SDK_HOME

我发现其他人所说的ANDROID_SDK_HOME环境变量,我发现我的机器没有在所有定义的值,所以我加了它,并将它设置如下所示:
C:\\用户\\名为myUsername \\ Android的\\ SDK

然后我又开始Android的工作室,开始了AVD管理。
这一次,没有设备显示,而是AVD管理促使我创建一个具有如下窗口:

现在,我尝试下载与谷歌的API的设备之一,但每次我这样做的时候,他们下载并安装成功,但随后从列表中消失。请注意,接下来的图像中有没有API级别15或16与谷歌的API为ARM架构。结果

另外请注意,有一个与ARM API级别17家上市。
我现在将尝试安装的。

您可以看到,它成功下载并安装了罚款。
现在,我单击[完成]按钮。
该项目将不再出现在我的列表中。

API级别15项自动选择。我假设,因为当我安装Android的工作室,一个最初下载。

最后,如果你取消选中[]显示下载的系统映像复选框 - 这是非常令人困惑 - 我假设你显示你已经下载了的人,那么你会看到,它只能显示一API级别15个虚拟设备。

这是所有相当可怕。有没有人看到这个问题?
有没有其他人能解决这个问题?

我假设我就必须去,做一个完整的Andr​​oid工作室重新安装。


解决方案

编辑2有了最终解决方案

由于警报和精明儿后SO( code-AP prentice )我是能够得到一个解决方案。

这是我必须做的。


  1. 创建idea.properties文件并将其放置在\\ networkLocation \\ MyUserName输入\\ .Android 1.5 \\

  2. 将其中的两行指向我的本地磁盘


  

idea.config.path = C:/Users/myUserName/.AndroidStudio1.5/config/
  idea.system.path = C:/Users/myUserName/.AndroidStudio1.5/system /


然后,我又开始Android的工作室,我尝试安装,其中包括谷歌的API的系统映像。
它的工作和它被添加到列表中:

但是,它仍然没有表现出这我以前(15,16等)安装的其他API级别。

删除他们磁盘

我注意到,他们已经位于本地文件夹的位置:
%USERPROFILE%\\ Android的\\ SDK \\插件
无论出于何种原因。
我删除了所有的文件夹该路径下的和原来的API与谷歌选择在我的名单又出现了。请参阅图像突出显示的项目。

谷歌API级别15

SOLUTION
现在,当我安装他们,他们显示在列表中了,我可以创建基于这些新的自动真空淀积系统。一切正常。

修改
我用了一个工具,我写信给看哪里的Andr​​oid工作室写信给磁盘,我发现,揭示了问题的路径:

仍然访问网络路径

尽管我做了广泛的变化,以确保安装将我的本地磁盘上安装完全,Android的工作室节省一些(很多)的数据到这个路径。

我做了谷歌上:.AndroidStudio 1.5 \\设置\\
这使我对下列文件:
http://tool​​s.android.com/tech-docs/configuration

有,你会看到,安装时应使用%USERPROFILE%,以确定它写入这些数据。 USERPROFILE%点到我的本地磁盘我%。(C:\\用户\\ MyUserName输入),但Android的工作室仍坚持写数据到网络

下面是最重要的信息:
Windows系统:

 %USERPROFILE%\\ {FOLDER_NAME} \\ studio.exe.vmoptions
 和/或
%USERPROFILE%\\ {FOLDER_NAME} \\ studio64.exe.vmoptions
        %USERPROFILE%\\ {FOLDER_NAME} \\ idea.properties

我删除了远程.Android 1.5工作室目录,并将其复制到我的%USERPROFILE%(本地)目录中。然后我重新启动的Andr​​oid Studio和它认为它需要,因为它想要再次将其放置在远程目录再次生成了这一切。

核心问题


  

显然,它不使用%USERPROFILE%



更糟糕。
我卸载该应用程序和所有的设置(据说)。

卸载

然后我又装了整个事情,它看起来就好像它是选择默认正确的安装路径为:

在这里输入的形象描述

不过,当我开始工作室备份那么它打开了我曾与创建项目的第一个安装。

另外,我还看不到,我理应之前安装API形象。只有一个图像。没有别的。

这是真的不是一个伟大的安装系统。我工作的一本书,这有助于Android的开始,但离散事件,如果他们陷入这个问题的循环有没有办法让他们出来了良好的运行模拟器。

非常不幸的。

I installed Android Studio (1.5.1 -- see image for build details).

While installing I chose the custom option so I could install a specific path. I knew that my %SystemDrive% was pointed at a network location and I wanted to install to my local disk.

So, this means that by default, the application would've installed to : \networkpath\users\myUserName\Android\SDK

However, since I chose the custom installation I chose a local path: c:\users\myUsername\Android\SDK

Project Creation and Build Work Fine

Everything seemed to install fine and I was able to create a new project and build it with no problems.

However, when I attempted to run the built and then basically failed silently. The emulator never appeared and no error occurred. Android Monitor just shows a message stating that No Connected Device detected. AVD Manager

Luckily I knew a bit about checking to see what happened with the emulator and I opened up AVD Manager. The listed device displayed an error. I right-clicked the device and chose "View Details". That's when the AVD manager showed that it is attempting to read from the network path, even though I changed this in the custom installation. \networkPath\Users\myUserName\Windows.android\avd\Nexus4.avd and \networkPath\Users\myUserName\Windows.android\avd\Nexus4.ini

Registry Edit

I closed Android Studio. Then I opened regedit and edited the values at: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList which originally looked like the following:

And changed them so they all point directly to the c:\ drive (instead of %systemdrive%)

Environment Variable : ANDROID_SDK_HOME

I found that others have mentioned the ANDROID_SDK_HOME environment variable and I noticed that my machine doesn't have that value defined at all so I added it and set it up like the following: c:\users\myUsername\Android\SDK

I then started Android Studio again and started the AVD Manager. This time there were no devices show, but instead AVD Manager prompted me to create one with the following window:

Now, I'm attempting to download one of the devices with Google APIs, but each time I do, they download and install successfully, but then disappear from the list. Notice, in the next image there are not API Level 15 or 16 with Google APIs for arm architecture.

Notice additionally that there is one listed for API Level 17 with arm. I will now attempt to install that one.

You can see that it downloaded successfully and installed fine. Now, I click the [Finish] button. The item no longer appears in my list.

The API Level 15 item is chosen automatically. I'm assuming because that one was downloaded originally when I installed Android Studio.

Finally, if you uncheck the [ ] show downloadable system images checkbox -- which is terribly confusing -- and I'm assuming shows you the ones you've already downloaded, then you'll see that it only shows the one API Level 15 virtual device.

This is all quite terrible. Has anyone seen this problem? Has anyone else been able to fix it?

I'm assuming that I'll just have to go and do a complete re-install of Android Studio.

解决方案

EDIT 2 With Final Solution

Thanks to an alert and astute SO post-er (code-apprentice) I was able to get to a solution.

Here's what I had to do.

  1. create idea.properties file and place it at the \networkLocation\myUserName\.Android 1.5\
  2. place the two lines in it which point to my local disk

idea.config.path=C:/Users/myUserName/.AndroidStudio1.5/config/ idea.system.path=C:/Users/myUserName/.AndroidStudio1.5/system/

Then I started Android Studio again and I attempt to install a system image which included the Google APIs. It worked and it was added to the list:

However, it still did not show the other API LEVELS which I had installed before (15, 16, etc).

Deleted Them From Disk

I noticed that they had been located in a local folder at : %userprofile%\Android\SDK\add-ons for whatever reason. I deleted all of the folders under that path and the original APIs with Google choices appeared in my list again. See highlighted item in image.

SOLUTION Now when I install them they show up in the list and I can create new AVDs based upon them. Everything works.

EDIT I used a tool I wrote to watch where Android Studio wrote to disk and I found a path that reveals the problem:

Even though I've made extensive changes to insure the installation would install completely on my local disk, Android Studio saves some (a lot) of data out to this path.

I did a Google on : .AndroidStudio 1.5\config\ That led me to the following documentation: http://tools.android.com/tech-docs/configuration

There, you will see that the installation should be using %userprofile% to determine where it writes this data. My %userprofile% points to my local disk (c:\users\myUserName) but Android Studio still insists on writing data out to the network.

Here's the important information: Windows:

%USERPROFILE%\.{FOLDER_NAME}\studio.exe.vmoptions 
 and/or 
%USERPROFILE%\.{FOLDER_NAME}\studio64.exe.vmoptions
        %USERPROFILE%\.{FOLDER_NAME}\idea.properties

I deleted the remote .Android Studio 1.5 directory and copied it to my %userprofile% (local) directory. Then I restarted Android Studio and it thinks that it needs to generate all that again because it wants to place it at the remote directory again.

Core issue:

Obviously, it is not using %userprofile%


It gets worse. I uninstalled the application and all of the settings (supposedly).

Then I installed the entire thing again and it looked as if it were choosing the correct installation path by default:

But, when I started Studio back up then it opened up the project I had created with the first install.

Plus, I still cannot see the API image that I supposedly installed before. Only that one image. Nothing else.

This is really not a great installation system. I'm working on a book which helps beginning Android Devs but if they fall into this problem loop there is no way to get them out of it with a good running emulator.

Very unfortunate.

这篇关于在Android 1.5.1工作室和AVD管理器安装到自定义位置仿真器将无法运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆