2016-05-07 7 views
0

私はカレンダービューや日付ピッカーを追加しようとしたとき、私は私のアンドロイドのプロジェクトで問題が発生したレンダリング問題のメッセージが表示されているアンドロイドレンダリングエラーバイナリXMLファイルの行番号-1:不明なエラー膨張クラスは、

メッセージ: " レンダリングの問題レンダリング中に発生した 例外:バイナリXMLファイルの行#-1:エラー 膨張クラス不明> 「

と、このメッセージが


を詳述しています
java.lang.NoSuchFieldError: this$0 
at android.view.ViewRootImpl$RunQueue.postDelayed(ViewRootImpl.java:6872) 
at android.view.View.postDelayed(View.java:13008) 
at android.widget.CalendarViewLegacyDelegate$ScrollStateRunnable.doScrollStateChange(CalendarViewLegacyDelegate.java:956) 
at android.widget.CalendarViewLegacyDelegate.onScrollStateChanged(CalendarViewLegacyDelegate.java:829) 
at android.widget.CalendarViewLegacyDelegate.goTo(CalendarViewLegacyDelegate.java:816) 
at android.widget.CalendarViewLegacyDelegate.<init>(CalendarViewLegacyDelegate.java:334) 
at android.widget.CalendarView.<init>(CalendarView.java:105) 
at android.widget.CalendarView.<init>(CalendarView.java:92) 
at android.widget.CalendarView.<init>(CalendarView.java:88) 
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) 
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) 
at java.lang.reflect.Constructor.newInstance(Constructor.java:513) 
at android.view.LayoutInflater.createView(LayoutInflater.java:619) 
at android.view.BridgeInflater.onCreateView(BridgeInflater.java:107) 
at android.view.LayoutInflater.onCreateView(LayoutInflater.java:694) 
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:762) 
at android.view.BridgeInflater.createViewFromTag(BridgeInflater.java:149) 
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704) 
at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:835) 
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:811) 
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798) 
at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:838) 
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:811) 
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798) 
at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:838) 
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:811) 
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798) 
at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:838) 
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70) 
at android.view.LayoutInflater.rInflate(LayoutInflater.java:811) 
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:515) 
at android.view.LayoutInflater.inflate(LayoutInflater.java:394) 
at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:229) 
at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:426) 
at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:350) 
at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:520) 
at com.android.tools.idea.rendering.RenderTask$2.compute(RenderTask.java:508) 
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:967) 
at com.android.tools.idea.rendering.RenderTask.createRenderSession(RenderTask.java:508) 
at com.android.tools.idea.rendering.RenderTask.access$600(RenderTask.java:75) 
at com.android.tools.idea.rendering.RenderTask$3.call(RenderTask.java:620) 
at com.android.tools.idea.rendering.RenderTask$3.call(RenderTask.java:617) 
at com.android.tools.idea.rendering.RenderService.runRenderAction(RenderService.java:371) 
at com.android.tools.idea.rendering.RenderTask.render(RenderTask.java:617) 
at com.android.tools.idea.rendering.RenderTask.render(RenderTask.java:639) 
at com.intellij.android.designer.designSurface.AndroidDesignerEditorPanel$7.run(AndroidDesignerEditorPanel.java:519) 
at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:337) 
at com.intellij.util.ui.update.MergingUpdateQueue.execute(MergingUpdateQueue.java:327) 
at com.intellij.util.ui.update.MergingUpdateQueue$3.run(MergingUpdateQueue.java:271) 
at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:286) 
at com.intellij.util.ui.update.MergingUpdateQueue.flush(MergingUpdateQueue.java:244) 
at com.intellij.util.ui.update.MergingUpdateQueue.run(MergingUpdateQueue.java:234) 
at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:238) 
at com.intellij.util.Alarm$Request$1.run(Alarm.java:352) 
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439) 
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) 
at java.util.concurrent.FutureTask.run(FutureTask.java:138) 
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) 
at java.lang.Thread.run(Thread.java:695) 

と、これは私のレイアウトxmlファイルである

<RelativeLayout 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" 
tools:context="com.laguses.callsrecorder.callsrecorderapp.Records"> 


<LinearLayout 
    android:orientation="vertical" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent"> 

    <LinearLayout 
     android:orientation="horizontal" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:background="@color/backgroundcolor" 
     android:paddingTop="20dp" 
     android:paddingBottom="20dp" 
     android:paddingLeft="15dp" 
     android:paddingRight="15dp" 
     android:gravity="center"> 

     <LinearLayout 
      android:orientation="horizontal" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content"> 

      <ImageView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:id="@+id/imageView26" 
       android:src="@mipmap/records_showfilter_icn" /> 
     </LinearLayout> 

     <LinearLayout 
      android:orientation="horizontal" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" > 

      <ImageView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:id="@+id/imageView27" 
       android:src="@mipmap/records_hidefilter_icn" /> 
     </LinearLayout> 

     <LinearLayout 
      android:orientation="horizontal" 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" 
      android:gravity="right"> 

      <LinearLayout 
       android:orientation="horizontal" 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:gravity="center"> 

       <EditText 
        android:layout_width="112dp" 
        android:layout_height="wrap_content" 
        android:id="@+id/editText" 
        android:singleLine="true" 
        android:textColor="#ffffff" 
        android:background="@drawable/search_field_borderstyle" /> 

       <ImageView 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:id="@+id/imageView25" 
        android:src="@mipmap/records_search_icn" 
        android:layout_marginLeft="10dp" /> 
      </LinearLayout> 
     </LinearLayout> 

    </LinearLayout> 

    <LinearLayout 
     android:orientation="vertical" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:padding="20dp" 
     android:background="@color/backgroundcolor"> 

     <LinearLayout 
      android:orientation="horizontal" 
      android:layout_width="match_parent" 
      android:layout_height="match_parent" 
      android:background="@drawable/filtergroupshape"> 

      <LinearLayout 
       android:orientation="vertical" 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content"> 

       <CheckBox 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:text="Incoming Calls" 
        android:id="@+id/checkBox" 
        android:checked="false" /> 

       <CheckBox 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:text="Outgoing Calls" 
        android:id="@+id/checkBox2" 
        android:checked="false" /> 

       <CheckBox 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:text="Missed Calls" 
        android:id="@+id/checkBox3" 
        android:checked="false" /> 

       <CheckBox 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:text="Fails Calls" 
        android:id="@+id/checkBox4" 
        android:checked="false" /> 

       <CheckBox 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:text="Favorite Calls" 
        android:id="@+id/checkBox5" 
        android:checked="false" /> 
      </LinearLayout> 

      <CalendarView 
       android:layout_width="match_parent" 
       android:layout_height="match_parent" 
       android:id="@+id/calendarView" 
       android:layout_gravity="center_vertical" /> 

     </LinearLayout> 
    </LinearLayout> 

</LinearLayout> 

最終的に私はエラーが私はあなたが不足しているカレンダービューや日付ピッカー

+0

** 0 ** - あなたはXML宣言を逃しています。 ** 1 ** - この名前空間はあなたのxmlで 'com.laguses.callsrecorder.callsrecorderapp.Records'と定義されていますか? ** 2 ** - ** appアイコン以外**あなたのリソースのための 'mipmap'フォルダを使用すべきではありません**。代わりに 'drawable'フォルダを使用してください。 –

+0

0-私はxml宣言を追加しましたが、同じエラーを返しました - レコードはアクティビティで、xmlはレイアウトxmlファイルを投稿します 3 mipmapを使用しているので、mipmap hdpi xhdpi xxhdpi xxxhdpi drawableの "mdpi hdpi xhdpi xxhdpi xxxhdpi"フォルダを見つけられない –

+0

** 1 ** - すべての "外部"オブジェクトに名前空間を追加する必要があります。これはあなたのXMLレイアウトで行われなければなりません。 ** 2 ** - あなたが見つからない 'drawables'フォルダを作成し、**ミップマップを使用しないようにしてください。 –

答えて

0

を追加しようとしているときにのみ表示されていることに気づきましたXMLファイルの文字エンコーディング、要素を宣言する前に行を追加する

<?xml version="1.0" encoding="UTF-8"?> 
<RelativeLayout 
//Your XML code here 
+1

さらに詳しい情報:http://stackoverflow.com/questions/13743250/meaning-of-xml-version-1-0-encoding-utf-8 –

+2

はい、エンコーディングはありませんが、これはどのような方法で関連していますか質問に?私の場合、これはエラーをまったく修正しません! – Zordid

0

<?xml version="1.0" encoding="utf-8"?> 
 
<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="vertical" 
 
    tools:context="com.example.android.justjava.MainActivity"> 
 

 
    <TextView 
 
     android:id="@+id/cobertura" 
 
     android:layout_width="wrap_content" 
 
     android:layout_height="wrap_content" 
 
     android:layout_margin="16dp" 
 
     android:text="Coberturas" 
 
     android:textAllCaps="true" 
 
     android:textSize="16sp" /> 
 

 
    <CheckBox 
 
     android:id="@+id/crema_checkbox" 
 
     android:layout_width="wrap_content" 
 
     android:layout_height="wrap_content" 
 
     android:checked="false" 
 
     android:text="Crema" /> 
 

 
    <TextView 
 
     android:id="@+id/cantidad" 
 
     android:layout_width="wrap_content" 
 
     android:layout_height="wrap_content" 
 
     android:layout_margin="16dp" 
 
     android:text="¿Cuantas tazas de café desea?" 
 
     android:textAllCaps="true" 
 
     android:textSize="16sp" /> 
 

 
    <LinearLayout 
 
     android:layout_width="match_parent" 
 
     android:layout_height="wrap_content" 
 
     android:orientation="horizontal" 
 
     android:weightSum="1"> 
 

 
     <Button 
 
      android:layout_width="48dp" 
 
      android:layout_height="48dp" 
 
      android:layout_marginLeft="16dp" 
 
      android:onClick="decrecer" 
 
      android:text="-" /> 
 

 
     <TextView 
 
      android:id="@+id/cantidad_text_view" 
 
      android:layout_width="wrap_content" 
 
      android:layout_height="wrap_content" 
 
      android:layout_marginLeft="16dp" 
 
      android:layout_weight="0.13" 
 
      android:text="0" 
 
      android:textColor="#000000" 
 
      android:textSize="16dp" /> 
 

 
     <Button 
 
      android:id="@+id/button" 
 
      android:layout_width="48dp" 
 
      android:layout_height="48dp" 
 
      android:layout_marginLeft="16dp" 
 
      android:onClick="incrementar" 
 
      android:text="+" /> 
 

 
     <Button 
 
      android:layout_width="wrap_content" 
 
      android:layout_height="48dp" 
 
      android:layout_marginLeft="32dp" 
 
      android:onClick="submitOrder" 
 
      android:text="ORDEN" /> 
 

 
    </LinearLayout> 
 

 
    <TextView 
 
     android:layout_width="wrap_content" 
 
     android:layout_height="wrap_content" 
 
     android:layout_margin="16dp" 
 
     android:text="Orden de Pedido" 
 
     android:textAllCaps="true" 
 
     android:textSize="16sp" /> 
 

 
    <TextView 
 
     android:id="@+id/orden_de_pedido_text_view" 
 
     android:layout_width="wrap_content" 
 
     android:layout_height="wrap_content" 
 
     android:layout_marginLeft="16dp" 
 
     android:text="BsF 0" 
 
     android:textColor="#000000" 
 
     android:textSize="16dp" /> 
 

 
    <Button 
 
     android:layout_width="wrap_content" 
 
     android:layout_height="wrap_content" 
 
     android:layout_marginTop="15dp" 
 
     android:onClick="reiniciar" 
 
     android:text="reinicio" /> 
 

 
</LinearLayout>

+2

あなたが行った変更とその問題の修正方法を含めると、OPと将来の訪問者がより明確な画像を得ることができるように常に優先されます。 – Shaishav

関連する問題