現在Flutterの環境構築をしているのですが、USB接続したスマホ(SCL22)でデフォルトのプロジェクトを起動しようとすると、以下のようなエラーが起こります。
E/AndroidRuntime(17871): java.lang.RuntimeException: Unable to start activity ComponentInfo{lamrongol.date_interval_logger/lamrongol.date_interval_logger.MainActivity}: android.content.res.Resources$NotFoundException: File res/drawable-v21/launch_background.xml from drawable resource ID #0x7f040000
E/AndroidRuntime(17871): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2693)
E/AndroidRuntime(17871): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2758)
E/AndroidRuntime(17871): at android.app.ActivityThread.access$900(ActivityThread.java:177)
E/AndroidRuntime(17871): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1448)
E/AndroidRuntime(17871): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(17871): at android.os.Looper.loop(Looper.java:145)
E/AndroidRuntime(17871): at android.app.ActivityThread.main(ActivityThread.java:5942)
E/AndroidRuntime(17871): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(17871): at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime(17871): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
E/AndroidRuntime(17871): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
E/AndroidRuntime(17871): Caused by: android.content.res.Resources$NotFoundException: File res/drawable-v21/launch_background.xml from drawable resource ID #0x7f040000
E/AndroidRuntime(17871): at android.content.res.Resources.loadDrawableForCookie(Resources.java:3752)
E/AndroidRuntime(17871): at android.content.res.Resources.loadDrawable(Resources.java:3620)
E/AndroidRuntime(17871): at android.content.res.Resources.getDrawable(Resources.java:1852)
E/AndroidRuntime(17871): at android.content.res.Resources.getDrawable(Resources.java:1818)
E/AndroidRuntime(17871): at io.flutter.embedding.android.FlutterActivity.getSplashScreenFromManifest(FlutterActivity.java:493)
E/AndroidRuntime(17871): at io.flutter.embedding.android.FlutterActivity.provideSplashScreen(FlutterActivity.java:469)
E/AndroidRuntime(17871): at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onCreateView(FlutterActivityAndFragmentDelegate.java:301)
E/AndroidRuntime(17871): at io.flutter.embedding.android.FlutterActivity.createFlutterView(FlutterActivity.java:518)
E/AndroidRuntime(17871): at io.flutter.embedding.android.FlutterActivity.onCreate(FlutterActivity.java:415)
E/AndroidRuntime(17871): at android.app.Activity.performCreate(Activity.java:6288)
E/AndroidRuntime(17871): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
E/AndroidRuntime(17871): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2646)
E/AndroidRuntime(17871): ... 10 more
E/AndroidRuntime(17871): Caused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line #4: <item> tag requires a 'drawable' attribute or child tag defining a drawable
E/AndroidRuntime(17871): at android.graphics.drawable.LayerDrawable.inflateLayers(LayerDrawable.java:202)
E/AndroidRuntime(17871): at android.graphics.drawable.LayerDrawable.inflate(LayerDrawable.java:147)
E/AndroidRuntime(17871): at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:1150)
E/AndroidRuntime(17871): at android.graphics.drawable.Drawable.createFromXml(Drawable.java:1063)
E/AndroidRuntime(17871): at android.content.res.Resources.loadDrawableForCookie(Resources.java:3736)
E/AndroidRuntime(17871): ... 21 more
E/AndroidRuntime(19382): FATAL EXCEPTION: main
E/AndroidRuntime(19382): Process: lamrongol.date_interval_logger, PID: 19382
E/AndroidRuntime(19382): java.lang.RuntimeException: Unable to start activity ComponentInfo{lamrongol.date_interval_logger/lamrongol.date_interval_logger.MainActivity}: android.content.res.Resources$NotFoundException: File res/drawable-v21/launch_background.xml from drawable resource ID #0x7f040000
E/AndroidRuntime(19382): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2693)
E/AndroidRuntime(19382): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2758)
E/AndroidRuntime(19382): at android.app.ActivityThread.access$900(ActivityThread.java:177)
E/AndroidRuntime(19382): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1448)
E/AndroidRuntime(19382): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(19382): at android.os.Looper.loop(Looper.java:145)
E/AndroidRuntime(19382): at android.app.ActivityThread.main(ActivityThread.java:5942)
E/AndroidRuntime(19382): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(19382): at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime(19382): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
E/AndroidRuntime(19382): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
E/AndroidRuntime(19382): Caused by: android.content.res.Resources$NotFoundException: File res/drawable-v21/launch_background.xml from drawable resource ID #0x7f040000
E/AndroidRuntime(19382): at android.content.res.Resources.loadDrawableForCookie(Resources.java:3752)
E/AndroidRuntime(19382): at android.content.res.Resources.loadDrawable(Resources.java:3620)
E/AndroidRuntime(19382): at android.content.res.Resources.getDrawable(Resources.java:1852)
E/AndroidRuntime(19382): at android.content.res.Resources.getDrawable(Resources.java:1818)
E/AndroidRuntime(19382): at io.flutter.embedding.android.FlutterActivity.getSplashScreenFromManifest(FlutterActivity.java:493)
E/AndroidRuntime(19382): at io.flutter.embedding.android.FlutterActivity.provideSplashScreen(FlutterActivity.java:469)
E/AndroidRuntime(19382): at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onCreateView(FlutterActivityAndFragmentDelegate.java:301)
E/AndroidRuntime(19382): at io.flutter.embedding.android.FlutterActivity.createFlutterView(FlutterActivity.java:518)
E/AndroidRuntime(19382): at io.flutter.embedding.android.FlutterActivity.onCreate(FlutterActivity.java:415)
E/AndroidRuntime(19382): at android.app.Activity.performCreate(Activity.java:6288)
E/AndroidRuntime(19382): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
E/AndroidRuntime(19382): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2646)
E/AndroidRuntime(19382): ... 10 more
E/AndroidRuntime(19382): Caused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line #4: <item> tag requires a 'drawable' attribute or child tag defining a drawable
E/AndroidRuntime(19382): at android.graphics.drawable.LayerDrawable.inflateLayers(LayerDrawable.java:202)
E/AndroidRuntime(19382): at android.graphics.drawable.LayerDrawable.inflate(LayerDrawable.java:147)
E/AndroidRuntime(19382): at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:1150)
E/AndroidRuntime(19382): at android.graphics.drawable.Drawable.createFromXml(Drawable.java:1063)
E/AndroidRuntime(19382): at android.content.res.Resources.loadDrawableForCookie(Resources.java:3736)
E/AndroidRuntime(19382): ... 21 more
√ Built build\app\outputs\flutter-apk\app-debug.apk.
E/AndroidRuntime(19610): FATAL EXCEPTION: main
E/AndroidRuntime(19610): Process: lamrongol.date_interval_logger, PID: 19610
E/AndroidRuntime(19610): java.lang.RuntimeException: Unable to start activity ComponentInfo{lamrongol.date_interval_logger/lamrongol.date_interval_logger.MainActivity}: android.content.res.Resources$NotFoundException: File res/drawable-v21/launch_background.xml from drawable resource ID #0x7f040000
E/AndroidRuntime(19610): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2693)
E/AndroidRuntime(19610): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2758)
E/AndroidRuntime(19610): at android.app.ActivityThread.access$900(ActivityThread.java:177)
E/AndroidRuntime(19610): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1448)
E/AndroidRuntime(19610): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(19610): at android.os.Looper.loop(Looper.java:145)
E/AndroidRuntime(19610): at android.app.ActivityThread.main(ActivityThread.java:5942)
E/AndroidRuntime(19610): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(19610): at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime(19610): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
E/AndroidRuntime(19610): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
E/AndroidRuntime(19610): Caused by: android.content.res.Resources$NotFoundException: File res/drawable-v21/launch_background.xml from drawable resource ID #0x7f040000
E/AndroidRuntime(19610): at android.content.res.Resources.loadDrawableForCookie(Resources.java:3752)
E/AndroidRuntime(19610): at android.content.res.Resources.loadDrawable(Resources.java:3620)
E/AndroidRuntime(19610): at android.content.res.Resources.getDrawable(Resources.java:1852)
E/AndroidRuntime(19610): at android.content.res.Resources.getDrawable(Resources.java:1818)
E/AndroidRuntime(19610): at io.flutter.embedding.android.FlutterActivity.getSplashScreenFromManifest(FlutterActivity.java:493)
E/AndroidRuntime(19610): at io.flutter.embedding.android.FlutterActivity.provideSplashScreen(FlutterActivity.java:469)
E/AndroidRuntime(19610): at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onCreateView(FlutterActivityAndFragmentDelegate.java:301)
E/AndroidRuntime(19610): at io.flutter.embedding.android.FlutterActivity.createFlutterView(FlutterActivity.java:518)
E/AndroidRuntime(19610): at io.flutter.embedding.android.FlutterActivity.onCreate(FlutterActivity.java:415)
E/AndroidRuntime(19610): at android.app.Activity.performCreate(Activity.java:6288)
E/AndroidRuntime(19610): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
E/AndroidRuntime(19610): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2646)
E/AndroidRuntime(19610): ... 10 more
E/AndroidRuntime(19610): Caused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line #4: <item> tag requires a 'drawable' attribute or child tag defining a drawable
E/AndroidRuntime(19610): at android.graphics.drawable.LayerDrawable.inflateLayers(LayerDrawable.java:202)
E/AndroidRuntime(19610): at android.graphics.drawable.LayerDrawable.inflate(LayerDrawable.java:147)
E/AndroidRuntime(19610): at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:1150)
E/AndroidRuntime(19610): at android.graphics.drawable.Drawable.createFromXml(Drawable.java:1063)
E/AndroidRuntime(19610): at android.content.res.Resources.loadDrawableForCookie(Resources.java:3736)
E/AndroidRuntime(19610): ... 21 more
対象デバイスをChrome(web)にすると正常に起動します。
なお、Android Emulatorで作ったデバイスはなぜか候補に表示されません。
参考にしたページはこちらです。 https://flutter.dev/docs/get-started/test-drive