Unable to locate the specified CSS file

I've been diving into the world of NativeScript and exploring the tutorials provided at . However, I'm facing an issue with getting the platform specific CSS to work properly. Every time I try to run the code, I encounter the following error message: "Error: Could not resolve app.component.common.css. Looked for: /data/data/org.nativescript.portalestapp/files/app/app.component.common.css."

Here is how my files are structured:

https://i.sstatic.net/tCMbf.png

app.component.ts

@Component({
selector: "ns-app",
moduleId: module.id,
templateUrl: "app.component.html",
styleUrls: ["app.component.css"]
})

app.component.common.css

.page{
background-color: #F4F5F7;
font-family:Poppins-Regular, Poppins
}

app.component.android.css

@import './app.component.common.css';

.page {
    background-color: blue;
}

Although I have followed the guide step by step, I am unsure where I might have gone wrong.

Answer №1

After making a tweak in the code by changing '@import './app.component.common.css'; to @import '/app.component.common.css';, I noticed that it started working perfectly. The reason behind this change eludes me, but the important thing is that it resolved the issue.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Display a list in thumbnail format on Wordpress

On my website, , the homepage thumbnail post does not display the text in a bulleted list like it does when I enter the post directly at . Can you explain why this is happening? I want to note that the theme admin supports Custom CSS which allows me to ad ...

IE7, IE6 display margins differently compared to other browsers

Can anyone help with an issue I'm having with a CSS ul list menu? #header-container #header ul.top-nav { float: left; margin: 20px 0 20px 10px; } #header-container #header ul.top-nav li { float: left; margin-right: 8px; border-rig ...

Toggle sidebar: expand/collapse

Looking for some assistance with my website project. I currently have two arrows to open and close the sidebar, but I would like one button to handle both actions instead. Can someone help me edit my code snippet to achieve this? Keep in mind that I am new ...

having trouble with developing a dropdown menu using jquery

I'm currently creating a drop-down menu for my website and here is the code I'm using: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html dir="ltr"> <head> <met ...

Position the div in the center, but for smaller sizes, switch to aligning

My current layout setup is as follows: Left side bar with a width of 200px and positioned at left: 0; Center section with a width of 700px and positioned at left: 250px; Right side bar with a width of 200px and positioned at right: 10px; While this arra ...

Angular routing functions flawlessly on Chrome Mac but encounters issues on Chrome iOS

Encountering a strange issue. My routing is properly configured and has been verified multiple times. Oddly enough, page1, page3, and page5 are functioning correctly, while page2, page4, and page6 fail to redirect as expected. Upon clicking the redirect ...

Issue with the code flow causing nested function calls to not work as expected

I'm experiencing an issue with my code: The problem arises when param.qtamodificata is set to true, causing the code to return "undefined" due to asynchronous calls. However, everything works fine if params.qtamodificata is false. I am seeking a sol ...

I am facing an issue with Adal.service.ts in Angular while running tests using Jest, it's not working as expected

Can someone help me, please? I'm in the process of migrating to Jest for running unit tests on Angular. However, when I try to execute the tests, I encounter the following error: FAIL src/app/modules/dashboard/components/navbar/navbar.component.spec. ...

The pure JavaScript function for changing the background color in CSS is not functioning properly

I'm having trouble understanding why the color does not change after clicking. Can anyone explain? function butt(color) { if(document.getElementById("bt").style.backgroundColor=="green"){ document.getElementById("bt").style.backgrou ...

What are the steps to align the content of a navbar to the right side?

Is there a way to align all the list content to the right in Bootstrap 5? I have tried using ml-auto, float-end, d-flex justify-content-end but none of them seem to work. It used to work with ml-auto in the previous version of Bootstrap, but I'm new t ...

Utilizing PHP variables and CSS to dynamically adjust the background color according to various events triggered by SQL data

Hopefully my explanation is clear. <?php $rx_event_color = $rx_image_color = '#FF0000'; if ($a['rx_event_exists'] == 1) { $rx_event_color = '#00FF00'; } if ($a['rx_scanned'] == 1) { $rx_image_color = '#00FF ...

After each animation in the sequence is completed, CSS3 looping occurs

I have currently set up a sequence of 5 frames, where each frame consists of 3 animations that gradually fade into the next frame over time. My challenge is figuring out how to loop the animation after completing the last sequence (in this case, #frame2). ...

Parallax scrolling within a div creates a dynamic visual effect

Hello there, thank you for taking the time to read this. I am currently working on a website and encountering some challenges while trying to implement a specific effect. I am aiming to achieve a parallax effect similar to what can be seen on this page. As ...

Understanding the percentages of CSS in relation to other elements

Can you define a CSS dimension in a percentage relative to an element other than its parent? Specifically, I want the border-radius of a div to be 10% of its width. However, using border-radius: 10% creates an elliptical border when the height and width ...

I am looking to adjust the placement of a brief Bootstrap code snippet for "Radio-Inline."

I need help customizing a Bootstrap 5 radio-inline snippet. <div class="col-md-6 col-md-offset-3 form-container"> <div class="row"> <div class="col-sm-12 form-group"> <div class=&qu ...

Issue with ng-multiselect-dropdown where clearing selected items programmatically does not visually work as expected

Utilizing the ng-multiselect-dropdown, I have encountered an issue where deselecting an option within the object itself clears the selected items visually and in the variable array. However, when programmatically clearing the selectedItems, the variable a ...

"Enhanced Web Interactions with JavaScript Animations

I've been diving into my JavaScript project lately. I'm currently focusing on creating some cool animations, particularly one that involves making a ball bounce up and down. My code seems to work flawlessly for the downward bounce, but I'm f ...

The error at core.js:4002 is a NullInjectorError with a StaticInjectorError in AppModule when trying to inject FilterService into Table

While exploring PrimeNg Table control in my application - as a beginner in PrimeNg & Angular, I encountered an error No provider for FilterService! shown below: core.js:4002 ERROR Error: Uncaught (in promise): NullInjectorError: StaticInjectorError(AppMo ...

'The condition 'NgIf' does not fall under either 'ComponentType' or 'DirectiveType' category

Encountering an error when using *ngIf in a basic component is quite puzzling. This particular issue seems to be triggered by the following code and app.module setup: app.component.html: <ng-container *ngIf="true"> <div>True</di ...

Reading text files line by line in TypeScript using Angular framework is a valuable skill to have

Struggling with reading text files line by line? While console.log(file) may work, it doesn't allow for processing each individual line. Here's my approach: In api.service.ts, I've implemented a function to fetch the file from the server: ...