Windows 10上具有Android模拟器的钛合金 [英] Titanium Alloy with Android Emulator on Windows 10

查看:74
本文介绍了Windows 10上具有Android模拟器的钛合金的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows 10上遇到钛合金的巨大问题.我正在使用Atom编辑器来编写我的应用程序.每当执行ti build时,最多输入10( !!! )次命令,直到找到Android设备为止. 对于Android模拟器,我收到如下错误消息:

I'm having huge problems with Titanium Alloy on Windows 10. I am using the Atom editor to write my apps. Whenever I execute ti build, enter the command up to 10(!!!) times until an Android device can be found. For the Android emulator I get an error message as follows:

    [Error] Failed to install apk on "emulator-5554"
    [Error] Error: device not found

我尝试了命令ti build -p androidti build -p android -T emulatorti build -p android -T emulator -C emulator-5554 --log-level info.我还尝试从avd.exe手动启动仿真器.我也删除了AVD并创建了一个新的

I tried the commands ti build -p android, ti build -p android -T emulator and ti build -p android -T emulator -C emulator-5554 --log-level info. I also tried starting the emulator manually from avd.exe. I deleted the AVD and created a new one, too

连接设备(已启用 USB调试)时,我尝试了ti build -p android -T deviceti build -p android -T device -C XT1032,其中XT1032是设备的名称.我收到如下错误消息:

When a device (USB debugging enabled) is connected, i tried ti build -p android -T device and ti build -p android -T device -C XT1032, where XT1032 is the name of the device. I get an error message as follows:

    [ERROR] Unable to find any devices

到目前为止,我还没有尝试过尝试再找到该设备.
执行命令时,我尝试了所有4种组合:

I didn't try so far if the device will be found after some more tries.
When executing the commands, I tried all 4 combinations:

  • 模拟器关闭,设备已断开连接
  • 模拟器关闭,设备已连接
  • 模拟器已打开,设备已断开连接
  • 模拟器已打开,设备已连接

我卸载了TitaniumAndroid SDKNodeJSJava,并删除了它们的所有文件夹.我也删除了所有注册表项.然后,我再次安装了所有内容,最后是Titanium.同样的问题.
我正在使用Java 32位( v8.0.1020.14 ),NodeJS v4.2.6 (也尝试过 v6 .3.0 ,但建议使用 v4.2.x ),Android SDK(SDK Tools v25.1.7 SDK Platform-tools 24.0. 1 SDK Build-tools 21.1.2 .我也尝试了SDK Build-tools 24.0.1 ,但建议使用 21.xx )和Titanium(SDK v6.0.0.v20160719180254 CLI v5.0.9 ).

I uninstalled Titanium, Android SDK, NodeJS and Java and deleted all folders of them. I removed all registry entries, too. Then I installed everything again, Titanium at last. Same problem.
I am using Java 32 bit (v8.0.1020.14), NodeJS v4.2.6 (also tried v6.3.0, but v4.2.x is recommend), Android SDK (SDK Tools v25.1.7, SDK Platform-tools 24.0.1 and SDK Build-tools 21.1.2. I also tried SDK Build-tools 24.0.1, but 21.x.x is recommend) and Titanium (SDK v6.0.0.v20160719180254, CLIv5.0.9).

我修改了我的环境变量,如下所示:
路径:
C:\android-sdk\tools;C:\android-sdk\platform-tools;C:\android-sdk\ndk-bundle;C:\Program Files (x86)\Java\jdk<version>\bin
JAVA_HOME:
C:\Program Files (x86)\Java\jdk<version>
ANDROID_SDK_HOME:
C:\android-sdk 我必须设置 ANDROID_SDK_HOME C:\android-sdk\ndk-bundle,否则ti setup check找不到NDK和AVD.

I modified my environment variables as follows:
PATH:
C:\android-sdk\tools;C:\android-sdk\platform-tools;C:\android-sdk\ndk-bundle;C:\Program Files (x86)\Java\jdk<version>\bin
JAVA_HOME:
C:\Program Files (x86)\Java\jdk<version>
ANDROID_SDK_HOME:
C:\android-sdk I had to set ANDROID_SDK_HOME and C:\android-sdk\ndk-bundle, otherwise the NDK and the AVDs wouldn't be found by ti setup check.

以下是ti setup check的屏幕截图:链接到图像 我不知道为什么 https://www.google.com 无法访问.此外,已安装Intel HAXM .我什至没有重新安装它.以前安装的Titanium可以找到它...

Here is a screenshot of ti setup check: link to image I don't know why https://www.google.com is unreachable. Furthermore, Intel HAXM is installed. I even reinstalled it without success. The previous installation of Titanium could find it...

感谢您的帮助!

TLDNR:我的钛合金装置在查找设备时遇到问题.它只会不时地运作,没有任何明显的模式

推荐答案

构建APK文件后,该过程终止.如果仿真器正在运行,则可以手动安装APK.在Command Line中使用此命令:

The process terminates after building the APK file. If the emulator is running, it is possible to manually install the APK. Use this command in the Command Line:

    <Android SDK folder>\platform-tools\adb.exe -s emulator-5554 install -r -d <project path>\<project folder>\build\android\bin\<project name>.apk

项目名称项目文件夹名称相同.安装APK之后,可以在仿真器中手动启动该应用程序.

The project name is equal to the project folder name. After installing the APK, the application can be started manually in the emulator.

尽管如此,在Windows 10上进行开发时仍然存在很多问题...我认为这迫使我切换到MAC.

Nonetheless, there are still a lot of issues when developping on Windows 10... I think this forces me to switch to a MAC.

这篇关于Windows 10上具有Android模拟器的钛合金的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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