First time Android developer here, and I'm having trouble getting a desired emulator to work in the "Java - ADT". All of the tutorials and posts I've found so far have been little to no use!
第一次在这里使用Android开发人员,我很难在“Java - ADT”中找到一个理想的模拟器。到目前为止,我发现的所有教程和帖子都没有什么用处!
After downloading the ADT Bundle from http://developer.android.com/sdk/index.html, I extracted the zip to a specified location: "C:\Users\Hunter\Documents\Android Development".
从http://developer.android.com/sdk/index.html下载了ADT Bundle后,我将zip压缩到一个指定的位置:“C:\ user \Hunter\Documents\Android Development”。
Now I'm trying to use this Samsung GALAXY Tab Emulator (which downloads as a zip file) inside the ADT. The instructions on the download page are vague and outdated; they make use of the "Android SDK and AVD Manager" which no longer exists!
现在我正在尝试使用这个三星GALAXY Tab仿真器(它可以下载为zip文件)在ADT中。下载页面上的说明是模糊和过时的;他们使用的“Android SDK和AVD管理器”已经不存在了!
Now, on to the questions:
现在,关于这些问题:
Where should I extract the Samsung GALAXY Tab Emulator zip file to so that the ADT can find and make use of it?
我应该在哪里提取三星GALAXY Tab仿真器zip文件,以便ADT可以找到并利用它?
After extraction, how do I install the Samsung Tab emulator in the ADT?
提取后,如何在ADT中安装Samsung Tab仿真器?
Any help is appreciated.
任何帮助都是感激。
1 个解决方案
#1
0
Ok, this is how I did it for my situation ( which is on Mac OS X, but I assume the steps would be similar on Windows, just different directories ):
这是我的情况(在Mac OS X上,但我假设在Windows上的步骤是类似的,只是不同的目录):
- Downloaded zip file, as normal
- 下载zip文件,正常。
- Once it is unzipped, I took the
<User Home>/Downloads/addon_galaxy_tab_samsung_electronics_8/skins/GALAXY Tab
folder and copied it. -
一旦它被解压缩,我就把
/下载/addon_galaxy_tab_samsung_electronics_8/skins/GALAXY Tab文件夹复制下来。 - I found where my android sdk stuff is ( in my case,
<User Home>/android-sdks
). The key is the<User Home>/android-sdks/platforms
. In that folder, there is a folder per Android version. -
我发现了我的android sdk(在我的情况下,
/android-sdks)。关键是 /android-sdks/platform。在该文件夹中,每个Android版本都有一个文件夹。 - I pasted the above "GALAXY Tab" folder to each Android version I cared about, specifically to the
<Android Version>/skins/
folders. -
我将上面的“GALAXY Tab”文件夹粘贴到我关心的每个Android版本,具体到
/皮肤/文件夹。 版本>
I actually renamed "GALAXY Tab" to "GALAXY_Tab", so that in my case I ended up with this:
我实际上把"GALAXY Tab"改名为"GALAXY Tab",所以在我的情况下,我的结果是:
pwd;ls -lrtd */skins/GALAXY*
<User Home>/android-sdks/platforms
drwxr-xr-x@ 19 work staff 646 Jul 22 18:19 android-22/skins/GALAXY_Tab
drwxr-xr-x@ 19 work staff 646 Jul 22 18:19 android-21/skins/GALAXY_Tab
drwxr-xr-x@ 19 work staff 646 Jul 22 18:19 android-20/skins/GALAXY_Tab
drwxr-xr-x@ 19 work staff 646 Jul 22 18:19 android-19/skins/GALAXY_Tab
drwxr-xr-x@ 19 work staff 646 Jul 22 18:19 android-18/skins/GALAXY_Tab
drwxr-xr-x@ 19 work staff 646 Jul 22 18:19 android-17/skins/GALAXY_Tab
Note that there is a good chance your "android" stuff will be in a different place, and may not even be named "android-sdks". In your case, it is probably under C:\Users\Hunter\Documents\Android Development\platforms
, or somewhere close to that folder.
请注意,你的“android”产品很有可能会出现在不同的地方,甚至可能不会被命名为“android-sdks”。在你的案例中,它可能是在C:\Users\Hunter\Documents\Android开发\平台,或接近该文件夹。
Now, as for actually using it in the AVD manager:
现在,实际上在AVD管理器中使用它:
- Bring up AVD manager
- 提出AVD管理器
- Go to "Device Definitions" tab
- 转到“设备定义”选项卡。
- Because "Create Device" almost never works for me, I normally just find a device that closely resembles the device I want. In this case, the '7.0" WSVGA (Tablet)' generic device definition was the closest, so I clicked that device, then clicked "Clone". I changed the name to "Galaxy Tab", but kept pretty much everything else the same. Once I was done filling out this form, I clicked "Clone Device".
- 因为“创建设备”几乎对我不起作用,我通常只会找到一个与我想要的设备非常相似的设备。在这种情况下,“7.0”WSVGA (Tablet)的通用设备定义是最接近的,所以我点击了这个设备,然后点击“克隆”。我把名字改成了“Galaxy Tab”,但几乎所有的东西都是一样的。当我填写完这张表格后,我点击了“克隆设备”。
- Once the device was cloned, I clicked my new "Galaxy Tab" device, then clicked "Create AVD"
- 一旦设备被克隆,我点击我的新“Galaxy Tab”设备,然后点击“创建AVD”
- In the AVD form, I changed Target to "API Level 19", CPU to "armeabi-v7a", chose my new "GALAXY_Tab" skin for Skin, updated the SD Card to 18 MB ( as per the link you provided ), and updated any other values I felt like changing ( I change as few of these values from the defaults as possible ).
- AVD形式,我改变了目标“API级别19”,CPU“armeabi-v7a”,选择我的新“GALAXY_Tab”皮肤对皮肤,更新了SD卡18 MB(按提供的链接),和更新任何其他值我觉得改变(我改变尽可能少的这些值的默认值)。
Hopefully this answers your question. I have used this basic principle for installing a few skins, and then using them in virtual devices.
希望这能回答你的问题。我已经使用了这个基本原则来安装一些皮肤,然后在虚拟设备中使用它们。
7/24/2015 edit:
7/24/2015编辑:
I found out today that my Galaxy Tab emulator is not considered a tablet by my application. I use Cordova, so my application runs inside WebView ( or Chrome for Android ), so I depend on the userAgent. In my case, userAgent has "Mobile" in it, so my code, whether right or wrong, considers the device to be a phone, not a tablet. A real device does not have this problem ( userAgent does not have "Mobile" in it ). Minor point, and does not invalidate my advice, but did want to warn people. I suspect it has something to do with the Android version I am testing against, Android 4.4.4, but that is a side issue to my overall project, and so will not be troubleshooting it.
我今天发现我的Galaxy Tab模拟器并不是我的应用程序的平板电脑。我使用Cordova,所以我的应用程序运行在WebView(或Android的Chrome)中,所以我依赖于userAgent。在我的例子中,userAgent有“Mobile”,所以我的代码,不管是对还是错,都认为设备是手机,而不是平板。一个真正的设备没有这个问题(userAgent没有“移动”)。小点,并没有使我的建议无效,但确实想警告人们。我怀疑这与我正在测试的Android版本的Android 4.4.4有关,但这是我整个项目的一个次要问题,所以不会对它进行故障排除。
#1
0
Ok, this is how I did it for my situation ( which is on Mac OS X, but I assume the steps would be similar on Windows, just different directories ):
这是我的情况(在Mac OS X上,但我假设在Windows上的步骤是类似的,只是不同的目录):
- Downloaded zip file, as normal
- 下载zip文件,正常。
- Once it is unzipped, I took the
<User Home>/Downloads/addon_galaxy_tab_samsung_electronics_8/skins/GALAXY Tab
folder and copied it. -
一旦它被解压缩,我就把
/下载/addon_galaxy_tab_samsung_electronics_8/skins/GALAXY Tab文件夹复制下来。 - I found where my android sdk stuff is ( in my case,
<User Home>/android-sdks
). The key is the<User Home>/android-sdks/platforms
. In that folder, there is a folder per Android version. -
我发现了我的android sdk(在我的情况下,
/android-sdks)。关键是 /android-sdks/platform。在该文件夹中,每个Android版本都有一个文件夹。 - I pasted the above "GALAXY Tab" folder to each Android version I cared about, specifically to the
<Android Version>/skins/
folders. -
我将上面的“GALAXY Tab”文件夹粘贴到我关心的每个Android版本,具体到
/皮肤/文件夹。 版本>
I actually renamed "GALAXY Tab" to "GALAXY_Tab", so that in my case I ended up with this:
我实际上把"GALAXY Tab"改名为"GALAXY Tab",所以在我的情况下,我的结果是:
pwd;ls -lrtd */skins/GALAXY*
<User Home>/android-sdks/platforms
drwxr-xr-x@ 19 work staff 646 Jul 22 18:19 android-22/skins/GALAXY_Tab
drwxr-xr-x@ 19 work staff 646 Jul 22 18:19 android-21/skins/GALAXY_Tab
drwxr-xr-x@ 19 work staff 646 Jul 22 18:19 android-20/skins/GALAXY_Tab
drwxr-xr-x@ 19 work staff 646 Jul 22 18:19 android-19/skins/GALAXY_Tab
drwxr-xr-x@ 19 work staff 646 Jul 22 18:19 android-18/skins/GALAXY_Tab
drwxr-xr-x@ 19 work staff 646 Jul 22 18:19 android-17/skins/GALAXY_Tab
Note that there is a good chance your "android" stuff will be in a different place, and may not even be named "android-sdks". In your case, it is probably under C:\Users\Hunter\Documents\Android Development\platforms
, or somewhere close to that folder.
请注意,你的“android”产品很有可能会出现在不同的地方,甚至可能不会被命名为“android-sdks”。在你的案例中,它可能是在C:\Users\Hunter\Documents\Android开发\平台,或接近该文件夹。
Now, as for actually using it in the AVD manager:
现在,实际上在AVD管理器中使用它:
- Bring up AVD manager
- 提出AVD管理器
- Go to "Device Definitions" tab
- 转到“设备定义”选项卡。
- Because "Create Device" almost never works for me, I normally just find a device that closely resembles the device I want. In this case, the '7.0" WSVGA (Tablet)' generic device definition was the closest, so I clicked that device, then clicked "Clone". I changed the name to "Galaxy Tab", but kept pretty much everything else the same. Once I was done filling out this form, I clicked "Clone Device".
- 因为“创建设备”几乎对我不起作用,我通常只会找到一个与我想要的设备非常相似的设备。在这种情况下,“7.0”WSVGA (Tablet)的通用设备定义是最接近的,所以我点击了这个设备,然后点击“克隆”。我把名字改成了“Galaxy Tab”,但几乎所有的东西都是一样的。当我填写完这张表格后,我点击了“克隆设备”。
- Once the device was cloned, I clicked my new "Galaxy Tab" device, then clicked "Create AVD"
- 一旦设备被克隆,我点击我的新“Galaxy Tab”设备,然后点击“创建AVD”
- In the AVD form, I changed Target to "API Level 19", CPU to "armeabi-v7a", chose my new "GALAXY_Tab" skin for Skin, updated the SD Card to 18 MB ( as per the link you provided ), and updated any other values I felt like changing ( I change as few of these values from the defaults as possible ).
- AVD形式,我改变了目标“API级别19”,CPU“armeabi-v7a”,选择我的新“GALAXY_Tab”皮肤对皮肤,更新了SD卡18 MB(按提供的链接),和更新任何其他值我觉得改变(我改变尽可能少的这些值的默认值)。
Hopefully this answers your question. I have used this basic principle for installing a few skins, and then using them in virtual devices.
希望这能回答你的问题。我已经使用了这个基本原则来安装一些皮肤,然后在虚拟设备中使用它们。
7/24/2015 edit:
7/24/2015编辑:
I found out today that my Galaxy Tab emulator is not considered a tablet by my application. I use Cordova, so my application runs inside WebView ( or Chrome for Android ), so I depend on the userAgent. In my case, userAgent has "Mobile" in it, so my code, whether right or wrong, considers the device to be a phone, not a tablet. A real device does not have this problem ( userAgent does not have "Mobile" in it ). Minor point, and does not invalidate my advice, but did want to warn people. I suspect it has something to do with the Android version I am testing against, Android 4.4.4, but that is a side issue to my overall project, and so will not be troubleshooting it.
我今天发现我的Galaxy Tab模拟器并不是我的应用程序的平板电脑。我使用Cordova,所以我的应用程序运行在WebView(或Android的Chrome)中,所以我依赖于userAgent。在我的例子中,userAgent有“Mobile”,所以我的代码,不管是对还是错,都认为设备是手机,而不是平板。一个真正的设备没有这个问题(userAgent没有“移动”)。小点,并没有使我的建议无效,但确实想警告人们。我怀疑这与我正在测试的Android版本的Android 4.4.4有关,但这是我整个项目的一个次要问题,所以不会对它进行故障排除。