我创建了一个演示项目,并试图在我的公司网络中针对genymotion android模拟器运行它。 当我运行“tns run android”时,我得到如下错误:
tns run android
Searching for devices...
Executing before-liveSync hook from C:\projects\apps\tnsDemo\hooks\before-liveSync\nativescript-angular-sync.js
Skipping prepare.
Building project...
Gradle build...
:config phase: createDefaultIncludeFiles
+found plugins: tns-core-modules-widgets
:config phase: createPluginsConfigFile
Creating product flavors include.gradle file in C:\projects\apps\tnsDemo\platforms\android/configurations folder...
:config phase: pluginExtend
+applying configuration from: C:\projects\apps\tnsDemo\platforms\android\configurations\include.gradle
+applying configuration from: C:\projects\apps\tnsDemo\platforms\android\configurations\tns-core-modules-widgets\include.gradle
:config phase: addAarDependencies
+adding dependency: C:\projects\apps\tnsDemo\platforms\android\libs\aar\widgets-release.aar
Exception in thread "main" java.lang.IllegalArgumentException: There are no parameters passed!
at com.ig.GetInterfaceNames.main(GetInterfaceNames.java:27)
FAILURE: Build failed with an exception.
其中: 构建文件'C:\ projects \ apps \ tnsDemo \ platforms \ android \ build-tools \ android-static-binding-generator \ build.gradle'line:69
出了什么问题: 任务'执行失败':asbg:generateInterfaceNamesList'。
处理'命令'C:\ Program Files \ Java \ jdk1.8.0_144 \ bin \ java.exe''以非零退出值1结束
尝试: 使用--stacktrace选项运行以获取堆栈跟踪。使用--info或--debug选项运行以获取更多日志输出。 无法在设备上应用更改:192.168.92.101:5555。错误是:命令gradlew.bat失败,退出代码为1。 从C:\ projects \ apps \ tnsDemo \ hooks \ after-watch \ nativescript-dev-typescript.js
执行后监视钩子平台:Android Java版本:1.8.0_144“ tns版本:3.2.1 tns-core-modules.d.ts:version:3.1.1 tns-android:version:3.2.0
似乎阻止了与模拟器的连接,但我不知道如何解决它。
答案 0 :(得分:0)