Repository: flutter
Issue: Flutter is unable to build the release mode app with IconData.
Labels: c: crash,platform-android,tool,a: build,has reproducible steps,P2,found in release: 3.0,found in release: 3.1,team-android,triaged-android

If you want to display any unicode character as Icon, you just write `Icon(IconData(<codePoint>))`, and it works fine in debug mode.
<img width="426" alt="Снимок экрана 2022-08-05 в 11 32 20" src="https://user-images.githubusercontent.com/3534966/183037079-a017316f-d387-4ecb-be4e-5125f9b3be84.png">

```
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({ super.key });

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatelessWidget
{
  const MyHomePage({ super.key});

  @override
  Widget build(final BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Test app')),
      // body: const Center(child: Icon(Icons.abc)),              /// Here is ok
      body: const Center(child: Icon(IconData(0x24B7))),  /// Here Flutter fails in release mode.
    );
  }
}

```

But if you try to build apk in release mode, the Flutter fails to do it without any description. It just crashes.
```
flutter_application_1 % flutter build apk

💪 Building with sound null safety 💪



FAILURE: Build failed with an exception.

* Where:
Script '/opt/flutter2/packages/flutter_tools/gradle/flutter.gradle' line: 1156

* What went wrong:
Execution failed for task ':app:compileFlutterBuildRelease'.
> Process 'command '/opt/flutter2/bin/flutter'' finished with non-zero exit value 1

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 18s
Running Gradle task 'assembleRelease'...                           19,4s
Gradle task assembleRelease failed with exit code 1
```

```
flutter_application_1 % flutter doctor -v
[✓] Flutter (Channel stable, 3.0.5, on macOS 12.3 21E230 darwin-x64, locale ru-RU)
    • Flutter version 3.0.5 at /opt/flutter2
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f1875d570e (3 weeks ago), 2022-07-13 11:24:16 -0700
    • Engine revision e85ea0e79c
    • Dart version 2.17.6
    • DevTools version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/sergey/Library/Android/sdk
    • Platform android-31, build-tools 30.0.3
    • 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.3.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.68.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.46.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-x64     • macOS 12.3 21E230 darwin-x64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 103.0.5060.134

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!
```