2016-12-27 4 views
0

Ich bin mit einer sehr einfachen Barcode-Scanner-App beschäftigt und bekomme einen seltsamen Fehler, nachdem die App in einen Genymotion-Emulator implementiert wurde ... Es scheint, als würde das Kernthema an der falschen Stelle gesucht werden? Irgendeine Idee, warum das passiert und wie ich es beheben kann?Nativescript sucht Nativescript-Themen-Kern am falschen Ort?

mein Fehler:

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'] 

Antwort

1

In Ihrem app.css Sie

@import 'nativescript-theme-core/css/core.dark.css'; 

Und in Ihrem app.component.ts haben sollte den expliziten Aufruf entfernen zu app.css. Es wird nicht benötigt, da die Stile in app.css standardmäßig in Ihrer Anwendung global sichtbar sind. Details finden Sie unter this comment.

Verwandte Themen