Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio: Rendering Problems

Tags:

android

xml

This is some very basic stuff. An Exception is raised during rendering: java.util.Locale.toLanguageTag()Ljava/lang/String;

The XML:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="horizontal">
    <EditText android:id="@+id/edit_message"
        android:layout_weight="1"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:hint="@string/edit_message" />
    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/button_send" />
</LinearLayout>

It seems that the issue is with the EditText object. Help would be appreciated.

like image 274
omm118 Avatar asked Nov 10 '14 06:11

omm118


2 Answers

This could be helpful for someone with the same issue. I use IntelliJ IDEA and I also had this problem...

After a while of playing with settings, I remembered I had this issue when I first started Android Development.

What caused this, was that I was developing for an Android Phone, but the rendering setting was set to Android Wear, after changing it to the non-wear setting, the problem was solved.

enter image description here

like image 113
Liam Cottle Avatar answered Sep 23 '22 07:09

Liam Cottle


It is a bug on the release build environment: Lava.Lang.Locale.toLanguageTag()

It appears only after Java 1.7, and Android API which is based on Java 6 does not support it.

Maybe this link can help you: https://bugzilla.xamarin.com/show_bug.cgi?id=12649

like image 24
QArea Avatar answered Sep 24 '22 07:09

QArea