Kewitschka
Kewitschka

Reputation: 1671

Error inflating class android.support.design.widget.NavigationView when adding AppIntro Library

My app works fine. Once I add "compile 'com.github.paolorotolo:appintro:3.3.0'" to my dependencies to include this library, this error occurs: Error inflating class android.support.design.widget.NavigationView

Here is my complete build.gradle:

    apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId "com.myId"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

repositories {
    mavenCentral()
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.1.0'
    compile 'com.android.support:design:23.1.0'
    compile 'com.nhaarman.listviewanimations:lib-core:3.1.0@aar'
    compile 'com.nhaarman.listviewanimations:lib-manipulation:3.1.0@aar'
    compile 'com.nhaarman.listviewanimations:lib-core-slh:3.1.0@aar'
    compile 'com.github.paolorotolo:appintro:3.3.0'    #This line makes it crash
}

Upvotes: 1

Views: 200

Answers (2)

stannums
stannums

Reputation: 342

The reason may be in styles. Try to use in Manifest

<activity android:name=".IntroActivity" ndroid:theme="@style/FullscreenTheme"/>

and in styles.xml :

<style name="FullscreenTheme" parent="Theme.AppCompat.Light.NoActionBar"/>

Upvotes: 0

Kewitschka
Kewitschka

Reputation: 1671

Finally I found out that I had to change

compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:design:23.1.0'

to

compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'

Upvotes: 1

Related Questions