首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Nativescript在错误的地方寻找Nativescript-主题-核心?

Nativescript在错误的地方寻找Nativescript-主题-核心?
EN

Stack Overflow用户
提问于 2016-12-27 23:29:39
回答 1查看 522关注 0票数 0

我忙于一个非常简单的条形码扫描器应用程序,并得到一个奇怪的错误后,该应用程序被部署到一个genymotion模拟器…它似乎在错误的地方寻找核心主题?你知道为什么会发生这种情况吗?我怎么才能修复它呢?

我的错误:

代码语言:javascript
复制
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']
EN

回答 1

Stack Overflow用户

发布于 2016-12-27 23:57:52

在您的app.css中,您应该有

代码语言:javascript
复制
@import 'nativescript-theme-core/css/core.dark.css';

并在您的app.component.ts中删除对app.css的显式调用。这是不必要的,因为默认情况下,app.css中的样式将在应用程序中全局可见。详情请参见this comment

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/41347888

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档