Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working on API 21 #104

Closed
BoHellgren opened this issue Nov 24, 2020 · 0 comments
Closed

Not working on API 21 #104

BoHellgren opened this issue Nov 24, 2020 · 0 comments

Comments

@BoHellgren
Copy link

I am using flutter_native_splash: ^0.1.9 with the following in pubspec.yaml:

flutter_native_splash:
    image: assets/images/splash.png
    color: "42a5f5"
    fill: false

When I run flutter pub run flutter_native_splash:create I get the following android/app/src/main/res/drawable/launch_background.xml

<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:drawable="@color/splash_color" />

    <!-- You can insert your own image assets here -->
    <!-- <item>
        <bitmap
            android:gravity="center"
            android:src="@mipmap/launch_image" />
    </item> -->
    <item>
        <bitmap android:gravity="fill" android:src="@drawable/splash" />
    </item>

</layer-list>

But the file android/app/src/main/res/drawable-v21/launch_background.xml is not updated. It looks like this:

<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:drawable="?android:colorBackground" />

    <!-- You can insert your own image assets here -->
    <!-- <item>
        <bitmap
            android:gravity="center"
            android:src="@mipmap/launch_image" />
    </item> -->
</layer-list>

When I start my app on Android 21, it crashes immediately. If I manually replace the xml file in drawable_v21 with the one in drawable, the app works.

Does flutter_native_splash not support Android 21?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant