因此,在将Android Studio更新到3.3.2版本之后,我遇到了这个问题。到那时为止一切都很好,我之前从未遇到过这个问题。 xml图像存储在drawable文件夹中。这在materialintro.slide.SimpleSlide中使用。我检查了解决方案,但没有任何效果。我已经添加了
defaultConfig {
vectorDrawables.useSupportLibrary = true
}
该应用大部分在Android 6版本设备以下崩溃。任何帮助表示赞赏。
AppIntroActivity:
public class AppIntroActivity extends IntroActivity {
public static final int REQUEST_CODE_INTRO = 1;
static
{
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
}
@Override
protected void onCreate(Bundle savedInstanceState) {
setFullscreen(true);
super.onCreate(savedInstanceState);
addSlide(new SimpleSlide.Builder()
.title("Welcome to NotEfi")
.description("All college related information customized at one place")
.image(R.drawable.ic_icons8_box) //error in this line
.background(R.color.blackPrimary)
.layout(R.layout.splash_intro)
.backgroundDark(R.color.colorAccent)
.scrollable(false)
.build());
}
我遇到以下错误:
Fatal Exception: android.content.res.Resources$NotFoundException: File res/drawable/ic_icons8_document.xml from drawable resource ID #0x7f0800a7
at android.content.res.Resources.loadDrawable(Resources.java:3453)
at android.content.res.Resources.getDrawable(Resources.java:1896)
at android.support.v7.widget.ResourcesWrapper.getDrawable(Unknown Source)
at android.support.v7.widget.TintResources.getDrawable(Unknown Source)
at android.support.v4.content.ContextCompat.getDrawable(Unknown Source)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(Unknown Source)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(Unknown Source)
at android.support.v7.content.res.AppCompatResources.getDrawable(Unknown Source)
at android.support.v7.widget.AppCompatImageHelper.setImageResource(Unknown Source)
at android.support.v7.widget.AppCompatImageView.setImageResource(Unknown Source)
at studentapp.notefi.Gridshow$GridAdapter.getView(Unknown Source)
at android.widget.AbsListView.obtainView(AbsListView.java:2351)
at android.widget.GridView.makeAndAddView(GridView.java:1356)
at android.widget.GridView.makeRow(GridView.java:345)
at android.widget.GridView.fillDown(GridView.java:287)
at android.widget.GridView.fillFromTop(GridView.java:421)
at android.widget.GridView.layoutChildren(GridView.java:1244)
at android.widget.AbsListView.onLayout(AbsListView.java:2207)
at android.view.View.layout(View.java:15033)
at android.view.ViewGroup.layout(ViewGroup.java:4799)
at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1055)
at android.view.View.layout(View.java:15033)
at android.view.ViewGroup.layout(ViewGroup.java:4799)
at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1055)
at android.view.View.layout(View.java:15033)
at android.view.ViewGroup.layout(ViewGroup.java:4799)
at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1055)
at android.view.View.layout(View.java:15033)
at android.view.ViewGroup.layout(ViewGroup.java:4799)
at android.support.v4.widget.DrawerLayout.onLayout(Unknown Source)
at android.view.View.layout(View.java:15033)
at android.view.ViewGroup.layout(ViewGroup.java:4799)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
at android.view.View.layout(View.java:15033)
at android.view.ViewGroup.layout(ViewGroup.java:4799)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1692)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1534)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1443)
at android.view.View.layout(View.java:15033)
at android.view.ViewGroup.layout(ViewGroup.java:4799)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
at android.view.View.layout(View.java:15033)
at android.view.ViewGroup.layout(ViewGroup.java:4799)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1692)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1534)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1443)
at android.view.View.layout(View.java:15033)
at android.view.ViewGroup.layout(ViewGroup.java:4799)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
at android.view.View.layout(View.java:15033)
at android.view.ViewGroup.layout(ViewGroup.java:4799)
at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2143)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1854)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1062)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5996)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761)
at android.view.Choreographer.doCallbacks(Choreographer.java:574)
at android.view.Choreographer.doFrame(Choreographer.java:544)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5590)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)
at dalvik.system.NativeStart.main(NativeStart.java)
答案 0 :(得分:0)
我认为这是因为您已将variety Cabernet Sauvignon Chardonnay
points
67 1 0
70 1 0
97 0 2
图标放在drawable-v24文件夹中,请尝试将其放在普通的drawable文件夹中。