Mam dziwny problem z nową wersją ADT. Pobrałem nową wersję Eclipse z wersji eclipse.org, a następnie zainstalowałem na niej narzędzie ADT. Wszystko dziala; Mogę stworzyć projekt dla Androida i wszystkie rzeczy pracy dobrze, z wyjątkiem:Wystąpił wyjątek podczas renderowania: java.lang.System.arraycopy
Kiedy próbuje utworzyć jeden układ xml, pojawia się następujący błąd:
Exception raised during rendering: java.lang.System.arraycopy
aw Error Log widać:
Failed to render set of icons for AnalogClock, AutonCompleteTextView, button, SmallButton , ....
Ff Zmieniam EditText
na TextView
, błąd zniknie. Mogę uruchomić swój program nawet z tym ostrzeżeniem, ale chcę zobaczyć mój układ w sekcji graficznej.
Mój układ jest:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/settingback"
android:orientation="vertical"
android:weightSum="480" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="50"
android:gravity="right"
android:orientation="horizontal" >
<Button
android:id="@+id/close"
android:layout_width="50dp"
android:layout_height="match_parent"
android:background="#00000000" />
</LinearLayout>
<View
android:id="@+id/view1"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="20" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="40"
android:orientation="horizontal"
android:weightSum="320" >
<View
android:id="@+id/view8"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="40" />
<EditText
android:id="@+id/textView1"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="240"
android:gravity="center|right"
android:background="#00000000"/>
<View
android:id="@+id/view9"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="40" />
</LinearLayout>
<View
android:id="@+id/view2"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="20" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="35"
android:orientation="horizontal" >
<View
android:id="@+id/view10"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="40" />
<EditText
android:id="@+id/textView2"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="240"
android:gravity="center|right"
android:background="#00000000" />
<View
android:id="@+id/view11"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="40" />
</LinearLayout>
<View
android:id="@+id/view3"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="10" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="35"
android:orientation="horizontal" >
<View
android:id="@+id/view12"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="40" />
<EditText
android:id="@+id/textView3"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="240"
android:gravity="center|right"
android:background="#00000000"/>
<View
android:id="@+id/view13"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="40" />
</LinearLayout>
<View
android:id="@+id/view4"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="105" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="40"
android:orientation="horizontal" >
<View
android:id="@+id/view14"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="40" />
<EditText
android:id="@+id/textView4"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="240"
android:gravity="center|right"
android:background="#00000000" />
<View
android:id="@+id/view15"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="40" />
</LinearLayout>
<View
android:id="@+id/view5"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="5" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="40" >
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="40"
/>
<EditText
android:id="@+id/textView6"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="240"
android:gravity="center|right"
android:background="#00000000" />
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="40" />
</LinearLayout>
<View
android:id="@+id/view6"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="20" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="30"
android:orientation="horizontal"
android:weightSum="320" >
<View
android:id="@+id/view16"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="90" />
<CheckBox
android:id="@+id/shake"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="70"
android:gravity="center" />
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="10" />
<CheckBox
android:id="@+id/ring"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="70"
android:gravity="center" />
<View
android:id="@+id/view17"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="80" />
</LinearLayout>
<View
android:id="@+id/view7"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="30" />
</LinearLayout>
Szukałem odpowiedzi tutaj, ale nie znaleźliśmy żadnych. Jak mogę to naprawić?
PS: Ten problem zdarzył się w ADT 23 - próbowałem go z ADT 22,6 i działało dobrze.
używasz wysokiego poziomu zagnieżdżonych wag. zagnieżdżone ciężary są szkodliwe dla wydajności. To może być przyczyną –
Nie sądzę, że @IllegalArgument, ponieważ jak powiedziałem, jeśli używam problem TextView już nie istnieje. tak czy inaczej można utworzyć ten układ bez użycia wysokiego poziomu zagnieżdżonych wag? –
Czy próbowałeś wyczyścić swój projekt? może plik R. jest uszkodzony? – erik