Android教程網
  1. 首頁
  2. Android 技術
  3. Android 手機
  4. Android 系統教程
  5. Android 游戲
 Android教程網 >> Android技術 >> Android開發 >> 關於android開發 >> 使用環信開發項目遇到錯誤提示 configure your build for VectorDrawableCompat,vectordrawablecompat

使用環信開發項目遇到錯誤提示 configure your build for VectorDrawableCompat,vectordrawablecompat

編輯:關於android開發

使用環信開發項目遇到錯誤提示 configure your build for VectorDrawableCompat,vectordrawablecompat


問題描述:在使用AndroidStudio開發項目時,使用環信重寫了聊天界面後,運行時app就崩掉了,查看日志報告,提示報錯如下:

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) 

根據提示,明顯是配置出現問題,找環信的客服咨詢,他們只說讓我去掉引用的v7包,可是仍然不好使。

 

解決方案:後來機智如我,查看環信Demo的Activity,是繼承EaseBaseActivity的,而我自己寫的Activity是繼承了AppCompatActivity,so找到問題的關鍵了,把繼承的父類改成環信自己的EaseBaseActivity就可以了。

  1. 上一頁:
  2. 下一頁:
熱門文章
閱讀排行版
Copyright © Android教程網 All Rights Reserved