Error message: configure your build for VectorDrawableCompat and vectordrawablecompat

Source: Internet
Author: User

Error message: configure your build for VectorDrawableCompat and vectordrawablecompat

Problem description: when developing a project using AndroidStudio, the chat interface is rewritten using huanxin, and the app crashes during running. view the log report and the error message is as follows:

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.zongtry.main.helpapplication/com.zongtry.main.helpapplication.activity.ChatListActivity}: java.lang.IllegalStateException: This app has been built with an incorrect configuration. Please configure your build for VectorDrawableCompat.                                                     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)                                                     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)                                                     at android.app.ActivityThread.access$600(ActivityThread.java:130)                                                     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)                                                     at android.os.Handler.dispatchMessage(Handler.java:99)                                                     at android.os.Looper.loop(Looper.java:137)                                                     at android.app.ActivityThread.main(ActivityThread.java:4745)                                                     at java.lang.reflect.Method.invokeNative(Native Method)                                                     at java.lang.reflect.Method.invoke(Method.java:511)                                                     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)                                                     at dalvik.system.NativeStart.main(Native Method)                                                  Caused by: java.lang.IllegalStateException: This app has been built with an incorrect configuration. Please configure your build for VectorDrawableCompat.                                                     at android.support.v7.widget.AppCompatDrawableManager.checkVectorDrawableSetup(AppCompatDrawableManager.java:692)                                                     at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:186)                                                     at android.support.v7.widget.TintTypedArray.getDrawableIfKnown(TintTypedArray.java:77)                                                     at android.support.v7.app.AppCompatDelegateImplBase.<init>(AppCompatDelegateImplBase.java:83)                                                     at android.support.v7.app.AppCompatDelegateImplV7.<init>(AppCompatDelegateImplV7.java:146)                                                     at android.support.v7.app.AppCompatDelegateImplV11.<init>(AppCompatDelegateImplV11.java:28)                                                     at android.support.v7.app.AppCompatDelegateImplV14.<init>(AppCompatDelegateImplV14.java:41)                                                     at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:193)                                                     at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:173)                                                     at android.support.v7.app.AppCompatActivity.getDelegate(AppCompatActivity.java:511)                                                     at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:71)                                                     at com.zongtry.main.helpapplication.activity.ChatListActivity.onCreate(ChatListActivity.java:23)                                                     at android.app.Activity.performCreate(Activity.java:5008)                                                     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)                                                     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)                                                     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)                                                      at android.app.ActivityThread.access$600(ActivityThread.java:130)                                                      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)                                                      at android.os.Handler.dispatchMessage(Handler.java:99)                                                      at android.os.Looper.loop(Looper.java:137)                                                      at android.app.ActivityThread.main(ActivityThread.java:4745)                                                      at java.lang.reflect.Method.invokeNative(Native Method)                                                      at java.lang.reflect.Method.invoke(Method.java:511)                                                      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)                                                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)                                                      at dalvik.system.NativeStart.main(Native Method) 

According to the prompts, it is obvious that there is a problem with the configuration. Contact the customer service personnel of huanxin. They only asked me to remove the referenced v7 package, but it is still difficult to do so.

 

Solution: Later I became a wit, like me. Viewing the Activity of the huanxin Demo inherits EaseBaseActivity, and the Activity I wrote myself inherits the AppCompatActivity. so is the key to finding the problem, replace the inherited parent class with your own EaseBaseActivity.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.