我几乎完成了使用 ionic 和 angular 开发我的应用程序。不幸的是,我完全被困住了。我无法再构建我的应用程序(在 android 上)。
这是错误:
ionic cordova build android
cordova.cmd platform add android --save
Using cordova-fetch for cordova-android@^8.0.0
Failed to fetch platform cordova-android@^8.0.0
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
Error: npm: Command failed with exit code 1 Error output:
npm ERR! code EINVALIDPACKAGENAME
npm ERR! Invalid package name "__ngcc_entry_points__.json": name cannot start with an underscore
npm ERR! A complete log of this run can be …Run Code Online (Sandbox Code Playgroud)我的 Ionic 5 和 Angular 应用程序有一个小问题。
\n所以,我有一个离子段,但我不可能更改处于活动/选中状态的段按钮的背景颜色。
\n除了官方文档之外,我尝试了在论坛上阅读的许多不同方法,但仍然不可能。
\n你能帮我吗?
我的 home.html 中的离子段:
\n<ion-segment value=\'favorites\' [(ngModel)]="segmentModel" (ionChange)="segmentChanged($event)" color="maindark" mode=\'ios\' swipeGesture=\'true\' scrollable=\'true\'>\n <ion-segment-button value="favorites">\n <ion-label>Favoris</ion-label>\n </ion-segment-button>\n <ion-segment-button value="settings">\n <ion-label>Param\xc3\xa8tres</ion-label>\n </ion-segment-button>\n</ion-segment>\nRun Code Online (Sandbox Code Playgroud)\nhome.scss 中该段的 SCSS:
\nion-segment {\n padding: 5px 0 5px 0;\n margin: 5vh 15vw 0 15vw;\n background-color: #2d303aab;\n}\n\nion-segment-button {\n padding: 7px 0 7px 0;\n font-size: 16px;\n color: white;\n}\n\n.segment-button-checked {\n color: #F8CF80 !important; // it works properly \n\n // Tried all of that but nothing work\n background-color: #2D303A !important; \n …Run Code Online (Sandbox Code Playgroud)