2016-01-08 60 views
1

我的應用程序正常工作。有一次,我加上 「編譯 'com.github.paolorotolo:appintro:3.3.0'」 我的依賴關係,包括this庫,出現此錯誤: Error inflating class android.support.design.widget.NavigationView添加AppIntro庫時將類android.support.design.widget.NavigationView膨脹時出錯

這裏是我的完整的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:[email protected]' 
    compile 'com.nhaarman.listviewanimations:lib-manipulation:[email protected]' 
    compile 'com.nhaarman.listviewanimations:lib-core-slh:[email protected]' 
    compile 'com.github.paolorotolo:appintro:3.3.0' #This line makes it crash 
} 

回答

1

最後,我發現我不得不改變

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

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

原因可能在於風格。嘗試在清單

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

和styles.xml使用方法:

<style name="FullscreenTheme" parent="Theme.AppCompat.Light.NoActionBar"/> 
相關問題