0
<?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="com.molitveniseznamkackrko.MainActivity">

    <WebView
        android:id="@+id/webview"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true"
        tools:layout_editor_absoluteX="8dp"
        tools:layout_editor_absoluteY="8dp" />
</RelativeLayout>

Here is the code. Error points to the first line. If I use utf-16, then app runs in emulator, but I can't build apk file (Error:(1) Error: utf-16: Not using UTF-8 as the file encoding. This can lead to subtle bugs with non-ascii characters [EnforceUTF8]). What am I doing wrong?

2
  • 1
    Make sure, there is no empty line/space on top Commented Jul 14, 2017 at 13:21
  • There is none. If it may help, this error started to appear when I wanted to have custom TTF font. I have then decided to not use custom font. Commented Jul 14, 2017 at 13:29

1 Answer 1

3

I have found a solution. I have copied everything execpt <?xml version="1.0" encoding="utf-8"?> and made new layout file and paste it there. And it works now. Still don't know what was a problem, but it doesn't really matter.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.