Resources$NotFoundException: File res/drawable/abc_ic_ab_back_material.xml

后端 未结 18 843
野性不改
野性不改 2020-11-27 15:49

After solving a JDK zero value error, now I\'m facing this one. I did a little research, but it seems I can\'t get to the point. Here is the log error:

FATA         


        
18条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-27 16:11

    I had this problem.

    In your Application class, in the onCreate() method, add:

    AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
    

    ... and also use AppCompatImageView instead of ImageView.

    Ex : BaseApplication.class :

    public class BaseApplication extends Application {
        @Override
        public void onCreate() {
            super.onCreate();
            //Your other code here...
            AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
        }
    }
    

    XML :

    
    

提交回复
热议问题