android Sliding tabs error -


i followed this tutorial making sliding tab application , after have encountered error:

unable start activity componentinfo{com.cap2.macsanity.droidgency/com.cap2.macsanity.droidgency.mainactivity}: android.view.inflateexception: binary xml file line #2: error inflating class

this activity main.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="vertical"     tools:context=".mainactivity">      <include         android:id="@+id/tool_bar"         layout="@layout/tool_bar"         android:layout_height="wrap_content"         android:layout_width="match_parent"         />      <com.cap2.macsanity.droidgency.         android:id="@+id/tabs"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:background="@color/colorprimary"/>      <android.support.v4.view.viewpager         android:id="@+id/pager"         android:layout_height="match_parent"         android:layout_width="match_parent"         android:layout_weight="1"></android.support.v4.view.viewpager>  </linearlayout> 

any 1 can me? in advance.

edit 2# it's fixed , solve thanks.

here, define proper library name desired package name class , if press ctrl + click, redirected class, , if it's not library name class name not exists.

if library name com.cap2.macsanity.droidgency. , package name activity , class name mainactivity, selected line be

<com.cap2.macsanity.droidgency.activity.mainactivity !------- !------ /> 

i hope work you. works fine me.


Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -