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

[BUG] It failed on parsing some android config or so #339

Closed
timnew opened this issue Feb 16, 2022 · 7 comments · Fixed by #322
Closed

[BUG] It failed on parsing some android config or so #339

timnew opened this issue Feb 16, 2022 · 7 comments · Fixed by #322

Comments

@timnew
Copy link

timnew commented Feb 16, 2022

ℹ️ Info

Version: v0.9.1

[✓] Flutter (Channel beta, 2.9.0-0.1.pre, on macOS 12.0.1 21A559 darwin-x64, locale en-AU)
    • Flutter version 2.9.0-0.1.pre at /Users/timnew/Workspace/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 8f1f9c10f0 (9 weeks ago), 2021-12-14 13:41:48 -0800
    • Engine revision 234aca678a
    • Dart version 2.16.0 (build 2.16.0-80.1.beta)
    • DevTools version 2.9.1

[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
    • Android SDK at /Users/timnew/Library/Android/sdk
    • Platform android-32, build-tools 32.1.0-rc1
    • ANDROID_HOME = /Users/timnew/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)

[✓] VS Code (version 1.64.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.34.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-x64     • macOS 12.0.1 21A559 darwin-x64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 97.0.4692.71

• No issues found!

💬 Description

Run the tool and it just failed.

  ════════════════════════════════════════════
     FLUTTER LAUNCHER ICONS (v0.9.1)
  ════════════════════════════════════════════


✓ Successfully generated launcher icons
Unhandled exception:
FormatException: Invalid number (at character 1)

^

#0      int._handleFormatError (dart:core-patch/integers_patch.dart:129:7)
#1      int.parse (dart:core-patch/integers_patch.dart:55:14)
#2      minSdk (package:flutter_launcher_icons/android.dart:309:18)
#3      createIconsFromConfig (package:flutter_launcher_icons/main.dart:94:47)
#4      createIconsFromArguments (package:flutter_launcher_icons/main.dart:60:7)

📜 Pubspec.yaml

flutter_icons: # flutter pub run flutter_launcher_icons:main
  android: 'ic_launcher'
  ios: true
  image_path: 'app_icon.png'
  # adaptive_icon_background:
  # adaptive_icon_foreground:
@joecharika
Copy link

Same here

@devj3ns
Copy link

devj3ns commented Feb 16, 2022

Seems related to #324.

Have a look at this comment for a workaround to fix this issue.

@timnew
Copy link
Author

timnew commented Feb 17, 2022

I ended up manually doing it, as it is one-off thing.
And I also need to update the web icon as well as macos bundle icon

@Pavel401
Copy link

Same error in Flutter 2.10.1

@faiz-netlinks
Copy link

still not working ....

@topex-psy
Copy link

Found my solution:

In app/build.gradle, set minSdkVersion to 21

defaultConfig {
        ...
        minSdkVersion 21
        ...
    }

@AirborneEagle
Copy link

@topex-psy had the solution for me
the lines by default look like

 minSdkVersion flutter.minSdkVersion
 targetSdkVersion flutter.targetSdkVersion

I changed them to:

        minSdkVersion 23
        targetSdkVersion 31

And it worked perfectly. 👍

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

Successfully merging a pull request may close this issue.

7 participants