Мое приложение не хочет запускаться на версиях андроид меньше 5.0.
В настройках выставил минимальную версию Api 4.4.
Все время работал на версии 7, но попытался запустить на 4.4 и вылетает ошибка:
FATAL EXCEPTION: main
Process: com.example.eqvol.eqvola, PID: 5010
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.eqvol.eqvola/com.example.eqvol.eqvola.LoginActivity}: android.view.InflateException: Binary XML file line #0: Error inflating class <unknown>
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
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:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #0: Error inflating class <unknown>
at android.view.LayoutInflater.createView(LayoutInflater.java:621)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.onCreateView(LayoutInflater.java:670)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:695)
at android.view.LayoutInflater.inflate(LayoutInflater.java:469)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:292)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
at com.example.eqvol.eqvola.LoginActivity.onCreate(LoginActivity.java:58)
at android.app.Activity.performCreate(Activity.java:5231)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
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:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at android.view.LayoutInflater.createView(LayoutInflater.java:595)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.onCreateView(LayoutInflater.java:670)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:695)
at android.view.LayoutInflater.inflate(LayoutInflater.java:469)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:292)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
at com.example.eqvol.eqvola.LoginActivity.onCreate(LoginActivity.java:58)
at android.app.Activity.performCreate(Activity.java:5231)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
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:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.content.res.Resources$NotFoundException: File res/drawable/background_image.xml from drawable resource ID #0x7f07005b
at android.content.res.Resources.loadDrawable(Resources.java:2101)
at android.content.res.TypedArray.getDrawable(TypedArray.java:602)
at android.view.View.<init>(View.java:3554)
at android.view.ViewGroup.<init>(ViewGroup.java:470)
at android.widget.LinearLayout.<init>(LinearLayout.java:176)
.....
Я нашел причину этого, но не пойму как исправить. Если в первой запущенной Activity убрать все картинки оно запускается и на версии 4.4.
Картинки такого типа
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="320dp"
android:height="640dp"
android:viewportWidth="320"
android:viewportHeight="640">
<path
android:fillColor="#00B2F0"
android:fillType="evenOdd"
android:pathData="M0,0 L320,0 L320,640 L0,640 Z" />
<path
android:fillColor="#00B2F0"
android:fillType="evenOdd"
android:pathData="M0,0 L320,0 L320,640 L0,640 Z" />
<path
android:fillAlpha=".2"
android:fillType="evenOdd"
android:strokeColor="#000"
android:strokeAlpha=".2"
android:strokeWidth="37.416"
android:pathData="M64.063,652.786 A2383.317,2383.317,0,0,1,62.032,634.832
C61.537,630.302,61.071,625.892,60.637,621.633
C58.494,600.593,57.275,584.611,57.275,574.993
C57.275,533.157,24.14,499.385,-16.554,499.385
C-57.248,499.385,-90.382,533.157,-90.382,574.994
C-90.382,616.83,-57.248,650.602,-16.554,650.602
C-6.76,650.602,9.326,650.972,30.074,651.622
C34.939,651.774,39.991,651.94,45.19,652.117
C51.504,652.332,57.839,652.557,64.063,652.787 Z" />
<path
android:fillAlpha=".2"
android:fillType="evenOdd"
android:strokeColor="#FFF"
android:strokeAlpha=".2"
android:strokeWidth="37.416"
android:pathData="M95.6,116.655 A2383.313,2383.313,0,0,1,93.57,98.701
C93.075,94.171,92.609,89.761,92.175,85.503
C90.032,64.461,88.813,48.48,88.813,38.863
C88.813,-2.974,55.678,-36.746,14.984,-36.746
C-25.71,-36.746,-58.844,-2.974,-58.844,38.863
C-58.844,80.699,-25.71,114.472,14.984,114.472
C24.778,114.472,40.864,114.842,61.612,115.491
C66.476,115.643,71.529,115.809,76.728,115.986
C83.042,116.202,89.377,116.426,95.601,116.656 Z" />
<path
android:fillAlpha=".2"
android:fillType="evenOdd"
android:strokeColor="#FFF"
android:strokeAlpha=".2"
android:strokeWidth="37.416"
android:pathData="M443.6,596.655 A2383.285,2383.285,0,0,1,441.57,578.701
C441.075,574.171,440.609,569.761,440.175,565.503
C438.032,544.461,436.813,528.48,436.813,518.863
C436.813,477.026,403.678,443.254,362.984,443.254
C322.29,443.254,289.156,477.026,289.156,518.863
C289.156,560.699,322.29,594.472,362.984,594.472
C372.778,594.472,388.864,594.842,409.612,595.491
C414.476,595.643,419.529,595.809,424.728,595.986
C431.042,596.202,437.377,596.426,443.601,596.656 Z" />
</vector>