我忙于一个非常简单的条形码扫描器应用程序,并得到一个奇怪的错误后,该应用程序被部署到一个genymotion模拟器…它似乎在错误的地方寻找核心主题?你知道为什么会发生这种情况吗?我怎么才能修复它呢?
我的错误:
JS: ns-renderer: ERROR BOOTSTRAPPING ANGULAR
JS: ns-renderer: File /data/data/org.nativescript.barcodescanner/files/app/nativescript-theme-core/css/core.dark.css does not exist. Resolved from: nativescript-theme-core/css/core.dark.css.
JS:
JS: Error: File /data/data/org.nativescript.barcodescanner/files/app/nativescript-theme-core/css/core.dark.css does not exist. Resolved from: nativescript-theme-core/css/core.dark.css.
JS: at FileSystemResourceLoader.get (/data/data/org.nativescript.barcodescanner/files/app/tns_modules/nativescript-angular/resource-loader.js:22:19)
JS: at DirectiveNormalizer._fetch (/data/data/org.nativescript.barcodescanner/files/app/tns_modules/@angular/compiler/bundles/compiler.umd.js:13661:45)
JS: at /data/data/org.nativescript.barcodescanner/files/app/tns_modules/@angular/compiler/bundles/compiler.umd.js:13761:55
JS: at Array.map (native)
JS: at DirectiveNormalizer._loadMissingExternalStylesheets (/data/data/org.nativescript.barcodescanner/files/app/tns_modules/@angular/compiler/bundles/compiler.umd.js:13761:16)
JS: at /data/data/org.nativescript.barcodescanner/files/app/tns_modules/@angular/compiler/bundles/compiler.umd.js:13764:28
JS: at ZoneDelegate.invoke (/data/data/org.nativescript.barcodescanner/files/app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js:190:28)
JS: at Zone.run (/data/data/org.nativescript.barcodescanner/files/app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js:83:43)
JS: at /data/data/org.nativescript.barcodescanner/files/app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js:449:57
JS: at ZoneDelegate.invokeTask (/data/data/org.nativescript.barcodescanner/files/app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js:223:37)
my app.css:
@import 'nativescript-theme-core/css/core.dark.css';
and in my app.component.css:
styleUrls: ['./app.css']发布于 2016-12-27 23:57:52
在您的app.css中,您应该有
@import 'nativescript-theme-core/css/core.dark.css';并在您的app.component.ts中删除对app.css的显式调用。这是不必要的,因为默认情况下,app.css中的样式将在应用程序中全局可见。详情请参见this comment。
https://stackoverflow.com/questions/41347888
复制相似问题