我正在尝试通过示例Groceries教程,并且iOS平台上的一切都很顺利,但是当我尝试tns run android --emulator
时,我收到一条Cannot read property 'targetNum' of undefined
错误消息。无法读取undefined属性'targetNum'
如果我做./gradlew buildapk --debug
我得到这些线路与错误:
23:35:07.082 [LIFECYCLE] [class org.gradle.TaskExecutionLogger] :processDebugResources FAILED
23:35:07.083 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :processDebugResources (Thread[main,5,main]) completed. Took 0.45 secs.
23:35:07.083 [DEBUG] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] Task worker [Thread[main,5,main]] finished, busy: 1.491 secs, idle: 0.011 secs
23:35:07.089 [ERROR] [org.gradle.BuildExceptionReporter]
23:35:07.090 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
23:35:07.090 [ERROR] [org.gradle.BuildExceptionReporter]
23:35:07.090 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
23:35:07.090 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':processDebugResources'.
23:35:07.090 [ERROR] [org.gradle.BuildExceptionReporter] > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/local/opt/android-sdk/build-tools/23.0.3/aapt'' finished with non-zero exit value 1
23:35:07.091 [ERROR] [org.gradle.BuildExceptionReporter]
23:35:07.091 [ERROR] [org.gradle.BuildExceptionReporter] * Try:
23:35:07.091 [ERROR] [org.gradle.BuildExceptionReporter] Run with --stacktrace option to get the stack trace.
23:35:07.092 [LIFECYCLE] [org.gradle.BuildResultLogger]
23:35:07.092 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED
我已经运行tns doctor
和验证ANDROID_HOME
变量。也升级到最新的核心模块,并尝试了一些cocoapods版本,因为tns医生一直在发送关于CocoaPods安装不良的警告。
编辑:谢谢@dennis寻找解决方案。这是有,但我错过了大淡蓝色的警告框:
非常感谢丹尼斯。我想指责Telerik的文档没有在他们的教程中包括这个,但后来我再次检查并注意到那里有一个很大的浅蓝色警告。 – zJorge
@zJorge很高兴你把它分类! –