FATAL EXCEPTION: main E/AndroIDRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{.MainActivity}: androID.content.res.Resources$NotFoundException: file res/drawable/abc_ic_ab_back_material.xml from drawable resource ID #0x7f020013 E/AndroIDRuntime: at androID.app.ActivityThread.performlaunchActivity(ActivityThread.java:2204) E/AndroIDRuntime: at androID.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2254) E/AndroIDRuntime: at androID.app.ActivityThread.access0(ActivityThread.java:141) E/AndroIDRuntime: at androID.app.ActivityThread$H.handleMessage(ActivityThread.java:1234) E/AndroIDRuntime: at androID.os.Handler.dispatchMessage(Handler.java:99) E/AndroIDRuntime: at androID.os.Looper.loop(Looper.java:137) E/AndroIDRuntime: at androID.app.ActivityThread.main(ActivityThread.java:5069) E/AndroIDRuntime: at java.lang.reflect.Method.invokeNative(Native Method) E/AndroIDRuntime: at java.lang.reflect.Method.invoke(Method.java:511) E/AndroIDRuntime: at com.androID.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) E/AndroIDRuntime: at com.androID.internal.os.ZygoteInit.main(ZygoteInit.java:560) E/AndroIDRuntime: at dalvik.system.NativeStart.main(Native Method) E/AndroIDRuntime: Caused by: androID.content.res.Resources$NotFoundException: file res/drawable/abc_ic_ab_back_material.xml from drawable resource ID #0x7f020013 E/AndroIDRuntime: at androID.content.res.Resources.loadDrawable(Resources.java:1953) E/AndroIDRuntime: at androID.content.res.Resources.getDrawable(Resources.java:660) E/AndroIDRuntime: at androID.support.v4.content.ContextCompat.getDrawable(ContextCompat.java:354) E/AndroIDRuntime: at androID.support.v7.Widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:193) E/AndroIDRuntime: at androID.support.v7.Widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:181) E/AndroIDRuntime: at androID.support.v7.Widget.AppCompatDrawableManager.checkVectorDrawableSetup(AppCompatDrawableManager.java:689) E/AndroIDRuntime: at androID.support.v7.Widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:186) E/AndroIDRuntime: at androID.support.v7.Widget.TintTypedArray.getDrawableIfKNown(TintTypedArray.java:77) E/AndroIDRuntime: at androID.support.v7.app.AppCompatDelegateImplBase.<init>(AppCompatDelegateImplBase.java:83) E/AndroIDRuntime: at androID.support.v7.app.AppCompatDelegateImplV7.<init>(AppCompatDelegateImplV7.java:146) E/AndroIDRuntime: at androID.support.v7.app.AppCompatDelegateImplV11.<init>(AppCompatDelegateImplV11.java:28) E/AndroIDRuntime: at androID.support.v7.app.AppCompatDelegateImplV14.<init>(AppCompatDelegateImplV14.java:41) E/AndroIDRuntime: at androID.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:193) E/AndroIDRuntime: at androID.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:173) E/AndroIDRuntime: at androID.support.v7.app.AppCompatActivity.getDelegate(AppCompatActivity.java:511) E/AndroIDRuntime: at androID.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:71) E/AndroIDRuntime: at .MainActivity.onCreate(MainActivity.java:29) E/AndroIDRuntime: at androID.app.Activity.performCreate(Activity.java:5104) E/AndroIDRuntime: at androID.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1092) E/AndroIDRuntime: at androID.app.ActivityThread.performlaunchActivity(ActivityThread.java:2148) E/AndroIDRuntime: at androID.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2254) E/AndroIDRuntime: at androID.app.ActivityThread.access0(ActivityThread.java:141) E/AndroIDRuntime: at androID.app.ActivityThread$H.handleMessage(ActivityThread.java:1234) E/AndroIDRuntime: at androID.os.Handler.dispatchMessage(Handler.java:99) E/AndroIDRuntime: at androID.os.Looper.loop(Looper.java:137) E/AndroIDRuntime: at androID.app.ActivityThread.main(ActivityThread.java:5069) E/AndroIDRuntime: at java.lang.reflect.Method.invokeNative(Native Method) E/AndroIDRuntime: at java.lang.reflect.Method.invoke(Method.java:511) E/AndroIDRuntime: at com.androID.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) E/AndroIDRuntime: at com.androID.internal.os.ZygoteInit.main(ZygoteInit.java:560) E/AndroIDRuntime: at dalvik.system.NativeStart.main(Native Method) E/AndroIDRuntime: Caused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line #17: invalID drawable tag vector E/AndroIDRuntime: at androID.graphics.drawable.Drawable.createFromXmlinner(Drawable.java:881) E/AndroIDRuntime: at androID.graphics.drawable.Drawable.createFromXml(Drawable.java:822) E/AndroIDRuntime: at androID.content.res.Resources.loadDrawable(Resources.java:1950) E/AndroIDRuntime: at androID.content.res.Resources.getDrawable(Resources.java:660) E/AndroIDRuntime: at androID.support.v4.content.ContextCompat.getDrawable(ContextCompat.java:354) E/AndroIDRuntime: at androID.support.v7.Widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:193) E/AndroIDRuntime: at androID.support.v7.Widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:181) E/AndroIDRuntime: at androID.support.v7.Widget.AppCompatDrawableManager.checkVectorDrawableSetup(AppCompatDrawableManager.java:689) E/AndroIDRuntime: at androID.support.v7.Widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:186) E/AndroIDRuntime: at androID.support.v7.Widget.TintTypedArray.getDrawableIfKNown(TintTypedArray.java:77) E/AndroIDRuntime: at androID.support.v7.app.AppCompatDelegateImplBase.<init>(AppCompatDelegateImplBase.java:83) E/AndroIDRuntime: at androID.support.v7.app.AppCompatDelegateImplV7.<init>(AppCompatDelegateImplV7.java:146) E/AndroIDRuntime: at androID.support.v7.app.AppCompatDelegateImplV11.<init>(AppCompatDelegateImplV11.java:28) E/AndroIDRuntime: at androID.support.v7.app.AppCompatDelegateImplV14.<init>(AppCompatDelegateImplV14.java:41) E/AndroIDRuntime: at androID.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:193) E/AndroIDRuntime: at androID.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:173) E/AndroIDRuntime: at androID.support.v7.app.AppCompatActivity.getDelegate(AppCompatActivity.java:511) E/AndroIDRuntime: at androID.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:71) E/AndroIDRuntime: at .MainActivity.onCreate(MainActivity.java:29) E/AndroIDRuntime: at androID.app.Activity.performCreate(Activity.java:5104) E/AndroIDRuntime: at androID.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1092) E/AndroIDRuntime: at androID.app.ActivityThread.performlaunchActivity(ActivityThread.java:2148) E/AndroIDRuntime: at androID.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2254) E/AndroIDRuntime: at androID.app.ActivityThread.access0(ActivityThread.java:141) E/AndroIDRuntime: at androID.app.ActivityThread$H.handleMessage(ActivityThread.java:1234) E/AndroIDRuntime: at androID.os.Handler.dispatchMessage(Handler.java:99) E/AndroIDRuntime: at androID.os.Looper.loop(Looper.java:137) E/AndroIDRuntime: at androID.app.ActivityThread.main(ActivityThread.java:5069) E/AndroIDRuntime: at java.lang.reflect.Method.invokeNative(Native Method) E/AndroIDRuntime: at java.lang.reflect.Method.invoke(Method.java:511) E/AndroIDRuntime: at com.androID.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) E/AndroIDRuntime: at com.androID.internal.os.ZygoteInit.main(ZygoteInit.java:560) E/AndroIDRuntime: at dalvik.system.NativeStart.main(Native Method)
我真的很困惑它可能是什么,我阅读并且无法得到错误:
我的应用:gradle是这样的:
apply plugin: 'com.androID.application'androID { compileSdkVersion 23 buildToolsversion "24.0.2" defaultConfig { applicationID "me.me2.com.myapp" minSdkVersion 15 targetSdkVersion 23 versionCode 1 versionname "1.0" } buildTypes { release { MinifyEnabled false proguardfiles getDefaultProguardfile('proguard-androID.txt'),'proguard-rules.pro' } }}dependencIEs { compile filetree(dir: 'libs',include: ['*.jar']) testCompile 'junit:junit:4.12' compile 'com.androID.support:appcompat-v7:23.4.0' compile 'com.androID.support:design:23.4.0' compile 'com.androID.support:recyclervIEw-v7:23.4.0' compile 'com.androID.support:cardvIEw-v7:23.4.0' compile 'com.Google.firebase:firebase-storage:9.4.0' compile 'com.Google.firebase:firebase-database:9.4.0' compile 'com.Google.firebase:firebase-auth:9.4.0' compile 'com.firebaseui:firebase-ui-database:0.4.4' compile 'com.squareup.picasso:picasso:2.5.2'}apply plugin: 'com.Google.gms.Google-services'
这是我的样式文件夹:
<resources> <!-- Base application theme. --> <style name="Apptheme" parent="theme.AppCompat.light.NoActionbar"> <!-- Customize your theme here. --> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> </style> <style name="Apptheme.NoActionbar"> <item name="windowActionbar">false</item> <item name="windowNoTitle">true</item> </style> <style name="Apptheme.AppbarOverlay" parent="themeOverlay.AppCompat.Dark.Actionbar" /> <style name="Apptheme.PopupOverlay" parent="themeOverlay.AppCompat.light" /> <style name="divIDer"> <item name="androID:layout_wIDth">match_parent</item> <item name="androID:layout_height">1dp</item> <item name="androID:background">?androID:attr/ListdivIDer</item> </style></resources>
如果需要我的mainactivity.class:
public class MainActivity extends AppCompatActivity { VIDeoVIEw vIDeoVIEw; @OverrIDe protected voID onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentVIEw(R.layout.activity_main); // VIDeoVIEw vIDeoVIEw = (VIDeoVIEw) findVIEwByID(R.ID.vIDeovIEw); vIDeoVIEw.setVIDeoURI(Uri.parse("androID.resource://"+getPackagename() + "/" +R.raw.vIDeo)); vIDeoVIEw.requestFocus(); /** * Loop */ vIDeoVIEw.setonPreparedListener(new MediaPlayer.OnPreparedListener() { @OverrIDe public voID onPrepared(MediaPlayer mp) { vIDeoVIEw.start(); mp.setLooPing(true); } }); } public voID Login(VIEw vIEw) { Intent intent = new Intent(this,FragmentMain.class); startActivity(intent); // finish(); } public voID Registro(VIEw vIEw) { Intent intent = new Intent(this,Registro.class); startActivity(intent); } @OverrIDe public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.menu_main,menu); return true; } @OverrIDe public boolean onoptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button,so long // as you specify a parent activity in AndroIDManifest.xml. int ID = item.getItemID(); //noinspection SimplifiableIfStatement if (ID == R.ID.action_settings) { return true; } return super.onoptionsItemSelected(item); }}
谢谢.
解决方法 如果您使用的是Gradle Plugin 2.0,则需要在Gradle中进行更改:// Gradle Plugin 2.0+ androID { defaultConfig { vectorDrawables.useSupportlibrary = true } }
如果您使用的是Gradle 1.5,那么您将使用而不是previus:
// Gradle Plugin 1.5 androID { defaultConfig { // Stops the Gradle plugin's automatic rasterization of vectors generatedDensitIEs = [] } // Flag to tell aapt to keep the attribute IDs around // This is handled for you by the 2.0+ Gradle Plugin aaptoptions { additionalParameters "--no-version-vectors" } }
检查:Update Android Support Library to 23.2.0 cause error: XmlPullParserException Binary XML file line #17<vector> tag requires viewportWidth > 0.
AndroID支持库参考号:Support Vector Drawables and Animated Vector Drawables.
还要更新AndroID支持依赖项
compile 'com.androID.support:appcompat-v7:23.4.0'compile 'com.androID.support:design:23.4.0'compile 'com.androID.support:recyclervIEw-v7:23.4.0'compile 'com.androID.support:cardvIEw-v7:23.4.0'
至
compile 'com.androID.support:appcompat-v7:24.2.0'compile 'com.androID.support:design:24.2.0'compile 'com.androID.support:recyclervIEw-v7:24.2.0'compile 'com.androID.support:cardvIEw-v7:24.2.0'
因为您已经在24.0.2版本中使用了构建工具.
@H_403_0@ 总结以上是内存溢出为你收集整理的android – 资源$NotFoundException:文件res / drawable / abc_ic_ab_back_material.xml全部内容,希望文章能够帮你解决android – 资源$NotFoundException:文件res / drawable / abc_ic_ab_back_material.xml所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)