我正在嘗試通過示例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很高興你把它分類! –