我的應用程序出現問題。 這是錯誤我越來越:錯誤在我的應用程序中膨脹類android.support.design.widget.NavigationView
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.justfashion/com.justfashion.ActivityMainWallet}: android.view.InflateException: Binary XML file line #91: Error inflating class android.support.design.widget.NavigationView
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2521)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2595)
at android.app.ActivityThread.access$800(ActivityThread.java:178)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1470)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5631)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:959)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:754)
Caused by: android.view.InflateException: Binary XML file line #91: Error inflating class android.support.design.widget.NavigationView
at android.view.LayoutInflater.createView(LayoutInflater.java:633)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:280)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
at com.material.BaseActivity.setContentView(BaseActivity.java:46)
at com.justfashion.ActivityMainWallet.onCreate(ActivityMainWallet.java:121)
at android.app.Activity.performCreate(Activity.java:6092)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1112)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2468)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2595)
at android.app.ActivityThread.access$800(ActivityThread.java:178)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1470)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5631)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:959)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:754)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:288)
at android.view.LayoutInflater.createView(LayoutInflater.java:607)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:280)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
at com.material.BaseActivity.setContentView(BaseActivity.java:46)
at com.justfashion.ActivityMainWallet.onCreate(ActivityMainWallet.java:121)
at android.app.Activity.performCreate(Activity.java:6092)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1112)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2468)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2595)
at android.app.ActivityThread.access$800(ActivityThread.java:178)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1470)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5631)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:959)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:754)
Caused by: java.lang.NoClassDefFoundError: android.support.design.internal.NavigationMenuPresenter
at android.support.design.widget.NavigationView.<init>(NavigationView.java:80)
at android.support.design.widget.NavigationView.<init>(NavigationView.java:92)
at java.lang.reflect.Constructor.newInstance(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:288)
at android.view.LayoutInflater.createView(LayoutInflater.java:607)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:280)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
at com.material.BaseActivity.setContentView(BaseActivity.java:46)
at com.justfashion.ActivityMainWallet.onCreate(ActivityMainWallet.java:121)
at android.app.Activity.performCreate(Activity.java:6092)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1112)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2468)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2595)
at android.app.ActivityThread.access$800(ActivityThread.java:178)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1470)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5631)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
這裏是我的XML的#91 +線:
<android.support.design.widget.NavigationView
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/navigation_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="start"
android:background="@color/md_white_1000"
app:headerLayout="@layout/nav_drawer_header"
app:menu="@menu/menu_drawer"
app:itemTextAppearance="@style/TextAppearance.AppCompat.Menu"
android:clipToPadding="false">
這裏是AA baseactivity錯誤行:
@Override
public void setContentView(int layoutResID) {
super.setContentView(layoutResID);
initAppCompatDesign();
initViews();
而與activitymainwallet相同:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main_activity);
AppLovinSdk.initializeSdk(this);
HeyzapAds.start(getString(R.string.heyzap_app_id), this);
//HeyzapAds.startTestActivity(this);
當我在gradle這個改變的東西(應用程序)文件出現問題:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.justfashion"
minSdkVersion 15
targetSdkVersion 23
multiDexEnabled true
}
signingConfigs {
release {
storeFile file("najnowszy.jks")
storePassword "asiunia"
keyAlias "production"
keyPassword "asiunia"
}
}
buildTypes {
release {
//minifyEnabled false
//proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
//signingConfig signingConfigs.release
//multiDexEnabled true
}
}
}
dependencies {
//compile 'com.google.android.gms:play-services:8.3.0'
compile 'com.facebook.android:facebook-android-sdk:4.+'
compile 'com.google.code.gson:gson:2.3.1'
compile files('libs/NativeXMonetizationSDK_v5.4.12.jar')
compile files('libs/Parse-1.3.8.jar')
compile files('libs/SuperRewards-3.1b.jar')
compile files('libs/TrialpayAndroidSdk.jar')
compile files('libs/acra-4.5.0.jar')
compile files('libs/adcolony.jar')
compile files('libs/adscendmedia1.0.1.jar')
compile files('libs/dagger-1.2.2.jar')
compile files('libs/javax.inject-1.jar')
compile files('libs/mediationsdk-6.2.2.jar')
compile files('libs/nineoldandroids-2.4.0.jar')
compile files('libs/personasdk1.1.jar')
compile files('libs/picasso-2.4.0.jar')
compile files('libs/tapjoyconnectlibrary.jar')
compile files('libs/vungle-publisher-adaptive-id-3.3.1.jar')
compile files('libs/chartboost.jar')
compile files('libs/applovin-sdk-6.1.5.jar')
compile files('libs/heyzap.jar')
compile files('libs/revmob.jar')
compile project(':appGradeLib')
//compile project(':sensiblefacebooksdk')
compile project(':googleplayserviceslib')
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:design:23.0.0'
compile files('libs/AdxmiCustomizedSdk_v1.2.0_2015-11-13.jar')
compile files('libs/AdxmiSdk_v5.4.0_2015-11-12.jar')
compile project(':unity-ads')
compile 'com.android.support:appcompat-v7:23.0.0'
compile files('libs/org.apache.http.legacy.jar')
}
我不記得我改變了一個。 Gradle有問題嗎?非常感謝你!
發佈您的styles.xml? – Raghavendra
@Raghavendra http://pastebin.com/h1fw32Cj – user2393513
希望這將hep你http://stackoverflow.com/questions/30709419/error-inflating-class-android-support-design-widget-navigationview – Raghavendra