我错过了什么,我已经完成了 nativescript 安装指南中提到的所有步骤,运行tns医生给我以下输出...
C:\abc\xyz>tns doctor
√ Getting environment information
√ Your ANDROID_HOME environment variable is set and points to correct directory.
√ Your adb from the Android SDK is correctly installed.
√ The Android SDK is installed.
√ A compatible Android SDK for compilation is found.
√ Javac is installed and is configured properly.
√ The Java Development Kit (JDK) is installed and is configured properly.
√ Local builds for iOS can be executed only on a macOS system. To build for iOS on a different operating system, you can use the NativeScript cloud infrastructure.
No issues were detected.
√ Getting NativeScript components versions information...
√ Component nativescript has 4.0.2 version and is up to date.
× Component tns-core-modules is not installed.
× Component tns-android is not installed.
× Component tns-ios is not installed.
答案 0 :(得分:0)
您是否尝试检查package.json
?或者尝试执行npm i
?还是tns install
?
答案 1 :(得分:0)
我认为有两点意见:
好像你没有跟随package.json
安装它,因为它可以一起安装。 https://docs.nativescript.org/start/quick-setup
如果此模块存在,您应该在
× Component tns-core-modules is not installed.
× Component tns-android is not installed.
× Component tns-ios is not installed.
内查看:
npm ls <module-name>
您还要检查这一点:<module-name>
,其中 this.http.get('http://example.com/date.php')
.subscribe((data:any[]) => { //<--say that you received an array
this.posts = data;
//Here filter is filter of an ARRAY, not Rxjs
this.postsfilter = data.filter(item => item.date == todayDate);
});
是要检查的模块。
如果有帮助,请告诉我。
答案 2 :(得分:0)
尝试一下-tns platform add android