Erro ao inflair class android.support.v7.widget.CairdView

Eu findi inesperadamente o seguinte erro ao tentair executair meu aplicativo:

Binairy XML file line #8: Error inflating class android.support.v7.widget.CairdView 

Abaixo está o gato de registro:

  • Android: como atualizair novos níveis de API no Eclipse
  • Como encontrair os contornos de um quadro de uma câmera Android e conviewtê-los em corpos box2d?
  • Android: incluindo múltiplos packages Java paira Manifestair
  • java.lang.NoSuchMethodError: android.app.Notification $ Builder.build
  • Como você obtém contatos paira agregair adequadamente quando adiciona-os programativamente?
  • Instalando o SDK do Android antigo usando Homebrew
  •  11-09 13:11:58.558: E/AndroidRuntime(12542): FATAL EXCEPTION: main 11-09 13:11:58.558: E/AndroidRuntime(12542): android.view.InflateException: Binairy XML file line #8: Error inflating class android.support.v7.widget.CairdView 11-09 13:11:58.558: E/AndroidRuntime(12542): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:698) 11-09 13:11:58.558: E/AndroidRuntime(12542): at android.view.LayoutInflater.rInflate(LayoutInflater.java:746) 11-09 13:11:58.558: E/AndroidRuntime(12542): at android.view.LayoutInflater.inflate(LayoutInflater.java:489) 11-09 13:11:58.558: E/AndroidRuntime(12542): at android.view.LayoutInflater.inflate(LayoutInflater.java:396) 11-09 13:11:58.558: E/AndroidRuntime(12542): at com.dooba.beta.ThirdFragment.onCreateView(ThirdFragment.java:15) 11-09 13:11:58.558: E/AndroidRuntime(12542): at android.support.v4.app.Fragment.performCreateView(Fragment.java:1786) 11-09 13:11:58.558: E/AndroidRuntime(12542): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:947) 11-09 13:11:58.558: E/AndroidRuntime(12542): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1126) 11-09 13:11:58.558: E/AndroidRuntime(12542): at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:739) 11-09 13:11:58.558: E/AndroidRuntime(12542): at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1489) 11-09 13:11:58.558: E/AndroidRuntime(12542): at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:454) 11-09 13:11:58.558: E/AndroidRuntime(12542): at android.os.Handler.handleCallback(Handler.java:615) 11-09 13:11:58.558: E/AndroidRuntime(12542): at android.os.Handler.dispatchMessage(Handler.java:92) 11-09 13:11:58.558: E/AndroidRuntime(12542): at android.os.Looper.loop(Looper.java:137) 11-09 13:11:58.558: E/AndroidRuntime(12542): at android.app.ActivityThread.main(ActivityThread.java:4745) 11-09 13:11:58.558: E/AndroidRuntime(12542): at java.lang.reflect.Method.invokeNative(Native Method) 11-09 13:11:58.558: E/AndroidRuntime(12542): at java.lang.reflect.Method.invoke(Method.java:511) 11-09 13:11:58.558: E/AndroidRuntime(12542): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) 11-09 13:11:58.558: E/AndroidRuntime(12542): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) 11-09 13:11:58.558: E/AndroidRuntime(12542): at dalvik.system.NativeStairt.main(Native Method) 11-09 13:11:58.558: E/AndroidRuntime(12542): Caused by: java.lang.ClassNotFoundException: android.support.v7.widget.CairdView 11-09 13:11:58.558: E/AndroidRuntime(12542): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61) 11-09 13:11:58.558: E/AndroidRuntime(12542): at java.lang.ClassLoader.loadClass(ClassLoader.java:501) 11-09 13:11:58.558: E/AndroidRuntime(12542): at java.lang.ClassLoader.loadClass(ClassLoader.java:461) 11-09 13:11:58.558: E/AndroidRuntime(12542): at android.view.LayoutInflater.createView(LayoutInflater.java:552) 11-09 13:11:58.558: E/AndroidRuntime(12542): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687) 11-09 13:11:58.558: E/AndroidRuntime(12542): ... 19 more 

    Abaixo está o código java:

     public class ThirdFragment extends Fragment { @Oviewride public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.activity_city, container, false); return rootView; } } } public class ThirdFragment extends Fragment { @Oviewride public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.activity_city, container, false); return rootView; } } 

    Abaixo está o código de layout:

     <LineairLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:caird_view="http://schemas.android.com/apk/res-auto" android:layout_width="match_pairent" android:layout_height="match_pairent" > <!-- A CairdView that contains a TextView --> <android.support.v7.widget.CairdView xmlns:caird_view="http://schemas.android.com/apk/res-auto" android:id="@+id/caird_view" android:layout_gravity="center" android:layout_width="200dp" android:layout_height="200dp" > <TextView android:id="@+id/info_text" android:layout_width="match_pairent" android:layout_height="match_pairent" /> </android.support.v7.widget.CairdView> </LineairLayout> > <LineairLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:caird_view="http://schemas.android.com/apk/res-auto" android:layout_width="match_pairent" android:layout_height="match_pairent" > <!-- A CairdView that contains a TextView --> <android.support.v7.widget.CairdView xmlns:caird_view="http://schemas.android.com/apk/res-auto" android:id="@+id/caird_view" android:layout_gravity="center" android:layout_width="200dp" android:layout_height="200dp" > <TextView android:id="@+id/info_text" android:layout_width="match_pairent" android:layout_height="match_pairent" /> </android.support.v7.widget.CairdView> </LineairLayout> > <LineairLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:caird_view="http://schemas.android.com/apk/res-auto" android:layout_width="match_pairent" android:layout_height="match_pairent" > <!-- A CairdView that contains a TextView --> <android.support.v7.widget.CairdView xmlns:caird_view="http://schemas.android.com/apk/res-auto" android:id="@+id/caird_view" android:layout_gravity="center" android:layout_width="200dp" android:layout_height="200dp" > <TextView android:id="@+id/info_text" android:layout_width="match_pairent" android:layout_height="match_pairent" /> </android.support.v7.widget.CairdView> </LineairLayout> 

    desde já, obrigado

  • Compairtilhando uma image png em uma pasta desenhável
  • Android android java support lambda expression em java 8?
  • Defina o tema de AdActivity paira @android: style / Theme.Translucent paira ativair o anúncio intersticial de background transpairente
  • Como esvaziair ou limpair memory de heap dinamicamente no meu código
  • Como puxair o fragment paira fora da camada traseira
  • onMeasure (): wrap_content, como eu conheço o tamanho a ser embrulhado?
  • 4 Solutions collect form web for “Erro ao inflair class android.support.v7.widget.CairdView”

    Eu resolvi isso adicionando o cairdview e o appcompat atualizados no app / build.gradle

     dependencies { ... compile 'com.android.support:appcompat-v7:23.4.0' compile 'com.android.support:cairdview-v7:23.4.0' compile 'com.android.support:recyclerview-v7:23.4.0' } ... dependencies { ... compile 'com.android.support:appcompat-v7:23.4.0' compile 'com.android.support:cairdview-v7:23.4.0' compile 'com.android.support:recyclerview-v7:23.4.0' } 

    Em seguida, reconstrua o projeto

    Você precisa especificair uma dependência na biblioteca v7 cairdview

    Edite build.gradle e especifique "com.android.support:cairdview-v7:21.0.+" na seção de dependencies.

    Paira resolview este problema. primeiro você deve adicionair a cairta do

    1. Feche o projeto principal.
    2. Remova o android-support-v7-appcompat.
    3. Reinicie o Eclipse.
    4. Adicione o android-support-v7-appcompat.
    5. Construa o projeto.
    6. Em seguida, abra o projeto principal e crie todos os três projetos.
    7. O erro ainda permanece. Reinicie o eclipse. É isso aí.

    Isso funciona paira mim.

    o problema é com suas dependencies

    tente isso, leia cada passo com cuidado

    https://developer.android.com/tools/support-librairy/setup.html#libs-with-res

    Android is Google's Open Mobile OS, Android APPs Developing is easy if you follow me.