I have a problem with the layout on the Android Studio. The Editor (XML file) and Emulator (Nexus 10) shows the layout right. But if I run the app on my Huawei Mediaped M5, the layout changes and everything is mixed.

The Emulator and my device have the same Resolution(2560\*1600).

![The Emulator](https://i.stack.imgur.com/bQExm.png)

![The screenshot of my real device](https://i.stack.imgur.com/MDMY0.jpg)

![the XML file](https://i.stack.imgur.com/379Io.png)

The XML file:

```
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">

<Button
    android:id="@+id/button_fahrzeugsimulation"
    android:layout_width="461dp"
    android:layout_height="203dp"
    android:layout_alignParentStart="true"
    android:layout_alignParentTop="true"
    android:layout_marginStart="108dp"
    android:layout_marginTop="173dp"
    android:background="@android:color/holo_blue_dark"
    android:text="Fahrzeugsimulation"
    android:textColor="#ffffff"
    android:textSize="38sp"
    android:textStyle="bold" />

<Button
    android:id="@+id/button_uebungen"
    android:layout_width="457dp"
    android:layout_height="182dp"
    android:layout_alignParentBottom="true"
    android:layout_alignStart="@+id/button_fahrzeugsimulation"
    android:layout_marginBottom="106dp"
    android:background="@android:color/holo_blue_dark"
    android:text="Übungen"
    android:textColor="#ffffff"
    android:textSize="38sp"
    android:textStyle="bold" />

<Button
    android:id="@+id/button_Weiterbildungsangebot"
    android:layout_width="wrap_content"
    android:layout_height="207dp"
    android:layout_alignBottom="@+id/button_fahrzeugsimulation"
    android:layout_alignParentEnd="true"
    android:layout_marginEnd="107dp"
    android:background="@android:color/holo_blue_dark"
    android:text="Weiterbildungsangebot"
    android:textColor="#ffffff"
    android:textSize="38sp"
    android:textStyle="bold" />

<Button
    android:id="@+id/button_Unterlagen"
    android:layout_width="498dp"
    android:layout_height="185dp"
    android:layout_alignStart="@+id/button_Weiterbildungsangebot"
    android:layout_alignTop="@+id/button_uebungen"
    android:layout_marginStart="-6dp"
    android:layout_marginTop="-2dp"
    android:background="@android:color/holo_blue_dark"
    android:text="Unterlagen"
    android:textColor="#ffffff"
    android:textSize="38sp"
    android:textStyle="bold" />

<TextView
    android:id="@+id/textView_eMobility"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentStart="true"
    android:layout_alignParentTop="true"
    android:layout_marginStart="16dp"
    android:layout_marginTop="16dp"
    android:text="eMobility"
    android:textColor="@android:color/holo_blue_dark"
    android:textStyle="bold"
    android:textSize="64sp" />

<TextView
    android:id="@+id/textView_Lab"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignTop="@+id/textView_eMobility"
    android:layout_toEndOf="@+id/textView_eMobility"
    android:text="Lab"
    android:textColor="@android:color/holo_red_light"
    android:textStyle="bold"
    android:textSize="52sp" />

```
['https://Stackoverflow.com/questions/51422311', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/10105210/']
I found the problem. So firstly I setup configuration like this and put in the rules collection:

```
  {
    test: /\.(woff|woff2|eot|ttf|svg)$/,
    loader: 'url-loader?limit=100000'
  }

```

After that I was getting error that my path is not working. That is cause my font url paths weren't relative to my root scss file. They were relative to the scss file were they used. Sass/libsass does not provide url rewriting, so all linked assets must be relative to the output. I fixed this using resolve-url-loader.

[sass-loader problems-with-url](https://github.com/webpack-contrib/sass-loader#problems-with-url) 

[resolve-url-loader](https://github.com/bholloway/resolve-url-loader)

```
{
    test: /\.css$/,
    use: [
      'vue-style-loader',
      'css-loader',
      'resolve-url-loader'
    ],
  },
  {
    test: /\.scss$/,
    use: [
      'vue-style-loader',
      'css-loader',
      'resolve-url-loader',
      'sass-loader?sourceMap'
    ],
  }

```

And if you are using vue-loader you need also this:

```
'scss': [
          'vue-style-loader',
          'css-loader',
          'resolve-url-loader',
          'sass-loader?sourceMap',
          {

```
Move your file-loader options to `rules` collection instead of `loaders`, it was deprecated and seems to have been overwritten by `rules` collection.