jonbhanson / flutter_native_splash

Automatically generates native code for adding splash screens in Android and iOS. Customize with specific platform, background color and splash image.
https://pub.dev/packages/flutter_native_splash
MIT License
1.35k stars 214 forks source link

pub finished with exit code 255 #146

Closed sahmirzali closed 3 years ago

sahmirzali commented 3 years ago

When I run flutter_native_splash: create this error happen. can you help me ?

Bug: - >

shahmirzali@Shahmirzalis-MacBook-Pro quran_app-master % flutter pub run flutter_native_splash:create [iOS] Creating splash images [iOS] Updating LaunchScreen.storyboard with width, and height Unhandled exception: NoSuchMethodError: The getter 'children' was called on null. Receiver: null Tried calling: children

0 Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)

1 _updateLaunchScreenStoryboard (package:flutter_native_splash/ios.dart:139:30)

2 _applyLaunchScreenStoryboard (package:flutter_native_splash/ios.dart:107:12)

3 _createiOSSplash (package:flutter_native_splash/ios.dart:66:9)

#4 tryCreateSplashByConfig (package:flutter_native_splash/supported_platform.dart:61:11) #5 tryCreateSplash (package:flutter_native_splash/supported_platform.dart:27:9) #6 createSplash (package:flutter_native_splash/flutter_native_splash.dart:17:9) #7 main (file:///Users/shahmirzali/Development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_native_splash-0.3.2/bin/create.dart:5:3) #8 _startIsolate. (dart:isolate-patch/isolate_patch.dart:299:32) #9 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12) pub finished with exit code 255 **Device ** - Device: iPhone 11 pro SIMULATOR macOS - OS: iOS14.4 **Flutter doctor** shahmirzali@Shahmirzalis-MacBook-Pro quran_app-master % flutter doctor -v [✓] Flutter (Channel stable, 1.22.6, on macOS 11.2.3 20D91 darwin-x64, locale en-AZ) • Flutter version 1.22.6 at /Users/shahmirzali/Development/flutter • Framework revision 9b2d32b605 (8 weeks ago), 2021-01-22 14:36:39 -0800 • Engine revision 2f0af37152 • Dart version 2.10.5 [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3) • Android SDK at /Users/shahmirzali/Library/Android/sdk • Platform android-30, build-tools 30.0.3 • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 12.4) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 12.4, Build version 12D4e • CocoaPods version 1.10.1 [✓] Android Studio (version 4.1) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin installed • Dart plugin version 201.9317 • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495) [✓] VS Code (version 1.54.3) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.20.0
jonbhanson commented 3 years ago

Can you post the contents of ios/Runner/Base.lproj/LaunchScreen.storyboard?

sahmirzali commented 3 years ago
Screen Shot 2021-03-18 at 16 40 42
jonbhanson commented 3 years ago

Sorry, I should have been more specific. Can you post the XML contents of ios/Runner/Base.lproj/LaunchScreen.storyboard? If you open it with Android Studio, you can copy the XML contents.

sahmirzali commented 3 years ago

`<?xml version="1.0" encoding="UTF-8"?>

`

jonbhanson commented 3 years ago

Your LaunchScreen.storyboard has been modified from the default created by Flutter. This package is designed to update the default version and it cannot handle some changes. You should be able to run the package if you revert to the Flutter default LaunchScreen.storyboard:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
    <dependencies>
        <deployment identifier="iOS"/>
        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
    </dependencies>
    <scenes>
        <!--View Controller-->
        <scene sceneID="EHf-IW-A2E">
            <objects>
                <viewController id="01J-lp-oVM" sceneMemberID="viewController">
                    <layoutGuides>
                        <viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
                        <viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
                    </layoutGuides>
                    <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                        <subviews>
                            <imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
                            </imageView>
                        </subviews>
                        <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                        <constraints>
                            <constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
                            <constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
                        </constraints>
                    </view>
                </viewController>
                <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
            </objects>
            <point key="canvasLocation" x="53" y="375"/>
        </scene>
    </scenes>
    <resources>
        <image name="LaunchImage" width="168" height="185"/>
    </resources>
</document>
sahmirzali commented 3 years ago

thanks a lot :) it's work