2017-07-06 221 views
-1

任何人都可以幫助我,請帶此錯誤嗎?運行Android應用程序

07-06 21:22:04.794 8489-8489/? D/dalvikvm: Late-enabling CheckJNI 
07-06 21:22:04.944 8489-8489/? I/dalvikvm: Could not find method android.view.Window$Callback.onProvideKeyboardShortcuts, referenced from method android.support.v7.view.WindowCallbackWrapper.onProvideKeyboardShortcuts 
07-06 21:22:04.944 8489-8489/? W/dalvikvm: VFY: unable to resolve interface method 15403: Landroid/view/Window$Callback;.onProvideKeyboardShortcuts (Ljava/util/List;Landroid/view/Menu;I)V 
07-06 21:22:04.944 8489-8489/? D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002 
07-06 21:22:04.944 8489-8489/? W/dalvikvm: VFY: unable to find class referenced in signature (Landroid/view/SearchEvent;) 
07-06 21:22:04.944 8489-8489/? I/dalvikvm: Could not find method android.view.Window$Callback.onSearchRequested, referenced from method android.support.v7.view.WindowCallbackWrapper.onSearchRequested 
07-06 21:22:04.944 8489-8489/? W/dalvikvm: VFY: unable to resolve interface method 15405: Landroid/view/Window$Callback;.onSearchRequested (Landroid/view/SearchEvent;)Z 
07-06 21:22:04.944 8489-8489/? D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002 
07-06 21:22:04.944 8489-8489/? I/dalvikvm: Could not find method android.view.Window$Callback.onWindowStartingActionMode, referenced from method android.support.v7.view.WindowCallbackWrapper.onWindowStartingActionMode 
07-06 21:22:04.944 8489-8489/? W/dalvikvm: VFY: unable to resolve interface method 15409: Landroid/view/Window$Callback;.onWindowStartingActionMode (Landroid/view/ActionMode$Callback;I)Landroid/view/ActionMode; 
07-06 21:22:04.944 8489-8489/? D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002 
07-06 21:22:04.954 8489-8489/? I/dalvikvm: Could not find method android.content.res.TypedArray.getChangingConfigurations, referenced from method android.support.v7.widget.TintTypedArray.getChangingConfigurations 
07-06 21:22:04.954 8489-8489/? W/dalvikvm: VFY: unable to resolve virtual method 477: Landroid/content/res/TypedArray;.getChangingConfigurations()I 
07-06 21:22:04.954 8489-8489/? D/dalvikvm: VFY: replacing opcode 0x6e at 0x0002 
07-06 21:22:04.954 8489-8489/? I/dalvikvm: Could not find method android.content.res.TypedArray.getType, referenced from method android.support.v7.widget.TintTypedArray.getType 
07-06 21:22:04.954 8489-8489/? W/dalvikvm: VFY: unable to resolve virtual method 499: Landroid/content/res/TypedArray;.getType (I)I 
07-06 21:22:04.954 8489-8489/? D/dalvikvm: VFY: replacing opcode 0x6e at 0x0008 
07-06 21:22:04.954 8489-8489/? I/dalvikvm: Could not find method android.content.Context.createDeviceProtectedStorageContext, referenced from method android.support.v4.content.ContextCompat.createDeviceProtectedStorageContext 
07-06 21:22:04.954 8489-8489/? W/dalvikvm: VFY: unable to resolve virtual method 268: Landroid/content/Context;.createDeviceProtectedStorageContext()Landroid/content/Context; 
07-06 21:22:04.954 8489-8489/? D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006 
07-06 21:22:04.954 8489-8489/? I/dalvikvm: Could not find method android.content.Context.getCodeCacheDir, referenced from method android.support.v4.content.ContextCompat.getCodeCacheDir 
07-06 21:22:04.954 8489-8489/? W/dalvikvm: VFY: unable to resolve virtual method 273: Landroid/content/Context;.getCodeCacheDir()Ljava/io/File; 
07-06 21:22:04.954 8489-8489/? D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006 
07-06 21:22:04.954 8489-8489/? I/dalvikvm: Could not find method android.content.Context.getColor, referenced from method android.support.v4.content.ContextCompat.getColor 
07-06 21:22:04.964 8489-8489/? W/dalvikvm: VFY: unable to resolve virtual method 274: Landroid/content/Context;.getColor (I)I 
07-06 21:22:04.964 8489-8489/? D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006 
07-06 21:22:04.964 8489-8489/? I/dalvikvm: Could not find method android.content.Context.getColorStateList, referenced from method android.support.v4.content.ContextCompat.getColorStateList 
07-06 21:22:04.964 8489-8489/? W/dalvikvm: VFY: unable to resolve virtual method 275: Landroid/content/Context;.getColorStateList (I)Landroid/content/res/ColorStateList; 
07-06 21:22:04.964 8489-8489/? D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006 
07-06 21:22:04.964 8489-8489/? I/dalvikvm: Could not find method android.content.Context.getDataDir, referenced from method android.support.v4.content.ContextCompat.getDataDir 
07-06 21:22:04.964 8489-8489/? W/dalvikvm: VFY: unable to resolve virtual method 277: Landroid/content/Context;.getDataDir()Ljava/io/File; 
07-06 21:22:04.964 8489-8489/? D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006 
07-06 21:22:04.964 8489-8489/? I/dalvikvm: Could not find method android.content.Context.getDrawable, referenced from method android.support.v4.content.ContextCompat.getDrawable 
07-06 21:22:04.964 8489-8489/? W/dalvikvm: VFY: unable to resolve virtual method 278: Landroid/content/Context;.getDrawable (I)Landroid/graphics/drawable/Drawable; 
07-06 21:22:04.964 8489-8489/? D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006 
07-06 21:22:04.964 8489-8489/? I/dalvikvm: Could not find method android.content.Context.getNoBackupFilesDir, referenced from method android.support.v4.content.ContextCompat.getNoBackupFilesDir 
07-06 21:22:04.964 8489-8489/? W/dalvikvm: VFY: unable to resolve virtual method 285: Landroid/content/Context;.getNoBackupFilesDir()Ljava/io/File; 
07-06 21:22:04.964 8489-8489/? D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006 
07-06 21:22:04.964 8489-8489/? I/dalvikvm: Could not find method android.content.Context.isDeviceProtectedStorage, referenced from method android.support.v4.content.ContextCompat.isDeviceProtectedStorage 
07-06 21:22:04.964 8489-8489/? W/dalvikvm: VFY: unable to resolve virtual method 298: Landroid/content/Context;.isDeviceProtectedStorage()Z 
07-06 21:22:04.964 8489-8489/? D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006 
07-06 21:22:04.984 8489-8489/? D/AndroidRuntime: Shutting down VM 
07-06 21:22:04.984 8489-8489/? W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x41692c08) 
07-06 21:22:04.994 8489-8489/? E/AndroidRuntime: FATAL EXCEPTION: main 
               Process: com.example.lenovo.app, PID: 8489 
               java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.lenovo.app/com.example.lenovo.app.MainActivity}: 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:2339) 
                at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2391) 
                at android.app.ActivityThread.access$900(ActivityThread.java:166) 
                at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1281) 
                at android.os.Handler.dispatchMessage(Handler.java:102) 
                at android.os.Looper.loop(Looper.java:146) 
                at android.app.ActivityThread.main(ActivityThread.java:5511) 
                at java.lang.reflect.Method.invokeNative(Native Method) 
                at java.lang.reflect.Method.invoke(Method.java:515) 
                at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283) 
                at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099) 
                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:713) 
                at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:194) 
                at android.support.v7.widget.TintTypedArray.getDrawableIfKnown(TintTypedArray.java:81) 
                at android.support.v7.app.AppCompatDelegateImplBase.<init>(AppCompatDelegateImplBase.java:129) 
                at android.support.v7.app.AppCompatDelegateImplV9.<init>(AppCompatDelegateImplV9.java:152) 
                at android.support.v7.app.AppCompatDelegateImplV11.<init>(AppCompatDelegateImplV11.java:29) 
                at android.support.v7.app.AppCompatDelegateImplV14.<init>(AppCompatDelegateImplV14.java:53) 
                at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:204) 
                at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:184) 
                at android.support.v7.app.AppCompatActivity.getDelegate(AppCompatActivity.java:518) 
                at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:70) 
                at com.example.lenovo.app.MainActivity.onCreate(MainActivity.java:10) 
                at android.app.Activity.performCreate(Activity.java:5322) 
                at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093) 
                at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2303) 
                at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2391)  
                at android.app.ActivityThread.access$900(ActivityThread.java:166)  
                at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1281)  
                at android.os.Handler.dispatchMessage(Handler.java:102)  
                at android.os.Looper.loop(Looper.java:146)  
                at android.app.ActivityThread.main(ActivityThread.java:5511)  
                at java.lang.reflect.Method.invokeNative(Native Method)  
                at java.lang.reflect.Method.invoke(Method.java:515)  
                at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)  
                at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)  
                at dalvik.system.NativeStart.main(Native Method)  
07-06 21:22:07.814 8489-8489/? I/Process: Sending signal. PID: 8489 SIG: 9 
+2

做一個簡單的谷歌搜索更多信息,提出了許多成果在這個​​問題上https://stackoverflow.com/questions/39762540/how -to-FIX-vectordrawablecompat配置錯誤功能於Android的工作室。 – tyczj

+2

請參閱以前的SO帖子:https://stackoverflow.com/questions/38143867/why-this-app-has-been-built-with-an-incorrect-configuration-error-occured-in-s – BusinessPlanQuickBuilder

+2

可能的重複[爲什麼「這個應用程序已經建立了一個不正確的配置」錯誤發生在一些手機?](https://stackoverflow.com/questions/38143867/why-this-app-has-been-built-with-an-錯誤配置錯誤發生在s) – Akriti

回答

0

此代碼添加到您的app.gradle:

android { 
//....something 

defaultConfig {   
    generatedDensities = [] 
} 


aaptOptions { 
    additionalParameters "--no-version-vectors" 
} 
+0

感謝它的工作。 –

0

呦需要正確實施VectorDrawableCompat:

1 - 確保您的gradle這個在v2.3.3

以更低的更新
dependencies { 
    classpath 'com.android.tools.build:gradle:2.3.3' 
} 

2-在你的Gradle中:

android { 
    defaultConfig { 
     vectorDrawables.useSupportLibrary = true 
    } 
} 

dependencies { 
    compile 'com.android.support:appcompat-v7:23.2.0' 
} 

3-在您的應用程序類:

@Override 
public void onCreate() { 
    super.onCreate(); 
    AppCompatDelegate.setCompatVectorFromResourcesEnabled(true); 
} 

4-在你使用個XML應用程序:srcCompat而不是機器人:SRC

注:

如果啓用矢量COMPAT在像這樣的每個活動

static { 
    AppCompatDelegate.setCompatVectorFromResourcesEnabled(true); 
} 

請不要忘記exten d從AppCompatActivity

您的活動

如果仍然沒有作品,請向我們提供有關您的項目