月前我已經成功完成了ns教程而不使用angular2。今天我想與NS + angular2競爭教程。我已經安裝了ng-groceries,但是當我做了tns運行android(iOS)時,它並沒有順利運行。然後我決定嘗試檢查我是否可以完成NS食品雜貨教程,並得到同樣的問題。我甚至使用Hello World模板。當我做tns運行時,我得到以下錯誤。Tns構建錯誤:sed:沒有這樣的文件或目錄
對於機器人:
1)
No manifest found in /Users/avmax/sandbox/web/study/tutorials/native-script/HelloWorld/app/App_Resources/Android/AndroidManifest.xml
2)
Execution failed for task ':processF0DebugResources'. com.android.ide.common.process.ProcessException: Failed to execute apt
3)
ENOENT: no such file or directory, scandir '/Users/avmax/sandbox/web/study/tutorials/native-script/HelloWorld/app/App_Resources'
對於iOS:
1)
ENOENT: no such file or directory, scandir '/Users/avmax/sandbox/web/study/tutorials/native-script/HelloWorld/platforms/ios/HelloWorld/Resources'
2)
We have failed to check if we need to add a compatability LaunchScreen.xib due to: Error: ENOENT: no such file or directory, open '/Users/avmax/sandbox/web/study/tutorials/native-script/HelloWorld/app/App_Resources/iOS/Info.plist'
TNS醫生:
Your components are up-to-date. No issues were detected.
我有:
tns --version : 2.5.3
nodejs -v : 7.7.3
我怎樣才能解決這些錯誤?
您可以嘗試安裝最新的LTS節點版本'6.10.3' -https://nodejs.org/en/並且升級到最新的NartiveScript 3.0'npm install nativescript --g'。那麼你可以驗證你是否會遇到同樣的問題,同時使用清晰的項目'tns create sample --ng'並構建它''tns run' –
@NikolayTsonev謝謝!我得到了解決方案 - 必須清理我的nam緩存並安裝tns版本> = 3.0 –