-1

Can anyone kindly help me, please with this error?

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
tyczj
  • 71,600
  • 54
  • 194
  • 296
A.L.S
  • 11
  • 3
  • 2
    Doing a simple google search brought up plenty of results on the issue https://stackoverflow.com/questions/39762540/how-to-fix-vectordrawablecompat-configuration-error-in-android-studio. – tyczj Jul 06 '17 at 19:55
  • 2
    Please see previous SO post at: https://stackoverflow.com/questions/38143867/why-this-app-has-been-built-with-an-incorrect-configuration-error-occured-in-s – Lew Perren Jul 06 '17 at 19:58
  • 2
    Possible duplicate of [Why "This app has been built with an incorrect configuration" error occured in some phones?](https://stackoverflow.com/questions/38143867/why-this-app-has-been-built-with-an-incorrect-configuration-error-occured-in-s) – Akriti Jul 06 '17 at 20:12

2 Answers2

0

add this code to your app.gradle :

android {
//....something

defaultConfig {        
    generatedDensities = []
}


aaptOptions {
    additionalParameters "--no-version-vectors"
}
Karim
  • 322
  • 1
  • 10
0

Yo need to implement correctly VectorDrawableCompat:

1- Make sure that your gradle is updated at less at v2.3.3

dependencies {
    classpath 'com.android.tools.build:gradle:2.3.3'
}

2- In your Gradle:

android {
    defaultConfig {
        vectorDrawables.useSupportLibrary = true
    }
}

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

3- In your Application class:

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

4- In your xmls use app:srcCompat instead of android:src

Note:

If you are enabling vector compat in each activity like this

static {
    AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
}

please don't forget extend your activity from AppCompatActivity

If still not works please provide us more information about your project

pablopatarca
  • 624
  • 6
  • 10