Skip to content

Flutter App Fails to Build/Run for Android and Windows, Works Fine on Web #515

@Sanavenkatesh

Description

@Sanavenkatesh

Description

I’m unable to run or build my Flutter app for Android or Windows, but it works fine on the web. I’m getting the following error:

D:\flutter\sana_rive>flutter build apk
Font asset "MaterialIcons-Regular.otf" was tree-shaken, reducing it from 1645184 to 1312 bytes (99.9% reduction). Tree-shaking can be disabled by providing the --no-tree-shake-icons flag when building your app.

FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':rive_native:configureCMakeRelWithDebInfo[arm64-v8a]'.
[CXX1429] error when building with cmake using C:\Users\svenk\AppData\Local\Pub\Cache\hosted\pub.dev\rive_native-0.0.9\android\CMakeLists.txt: --
The C compiler identification is Clang 18.0.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Users/svenk/AppData/Local/Android/Sdk/ndk/27.0.12077973/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe

  • skipped
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- rive_native: CMake is running on Windows.
    -- rive_native: Inferred app root: D:\flutter\sana_rive
    -- rive_native setup output: [rive_native] Starting Rive Native Setup...

    [rive_native] Building rive_native with assumed project root in:
    [rive_native] D:\flutter\sana_rive\

    [rive_native] Using package:rive_native from C:\Users\svenk\AppData\Local\Pub\Cache\hosted\pub.dev\rive_native-0.0.9
    [rive_native] Found Flutter app root at: D:\flutter\sana_rive
    [rive_native] Initializing Rive Native for TargetPlatform.android. This may take some time the first time it is run.
    [rive_native] Downloading "android" libraries for version "0.0.9+2"
    [rive_native] URL: https://rive-flutter-artifacts.rive.app/rive_native_versions/0.0.9%2B2/rive_native_artifacts_android.zip
    [rive_native] HandshakeException: Handshake error in client (OS Error:
    CERTIFICATE_VERIFY_FAILED: unable to get local issuer certificate(../../third_party/boringssl/src/ssl/handshake.cc:295))
    [rive_native] #0 _SecureFilterImpl._handshake (dart:io-patch/secure_socket_patch.dart:101:46)
    Fix Pub Analysis #1 _SecureFilterImpl.handshake (dart:io-patch/secure_socket_patch.dart:146:25)
    Flutter app using Rive won't run in Flutter web debug mode #2 _RawSecureSocket._secureHandshake (dart:io/secure_socket.dart:1009:54)
    Improving controllers so they can mix animations more easily. #3 _RawSecureSocket._tryFilter (dart:io/secure_socket.dart:1139:19)

    -- Configuring incomplete, errors occurred!
    See also "C:/Users/svenk/AppData/Local/Pub/Cache/hosted/pub.dev/rive_native-0.0.9/android/.cxx/RelWithDebInfo/4b3d2d24/arm64-v8a/CMakeFiles/CMakeOutput.log".

    C++ build system [configure] failed while executing:
    @echo off
    "C:\Users\svenk\AppData\Local\Android\sdk\cmake\3.22.1\bin\cmake.exe" ^
    "-HC:\Users\svenk\AppData\Local\Pub\Cache\hosted\pub.dev\rive_native-0.0.9\android" ^
    "-DCMAKE_SYSTEM_NAME=Android" ^
    "-DCMAKE_EXPORT_COMPILE_COMMANDS=ON" ^
    "-DCMAKE_SYSTEM_VERSION=21" ^
    "-DANDROID_PLATFORM=android-21" ^
    "-DANDROID_ABI=arm64-v8a" ^
    "-DCMAKE_ANDROID_ARCH_ABI=arm64-v8a" ^
    "-DANDROID_NDK=C:\Users\svenk\AppData\Local\Android\sdk\ndk\27.0.12077973" ^
    "-DCMAKE_ANDROID_NDK=C:\Users\svenk\AppData\Local\Android\sdk\ndk\27.0.12077973" ^
    "-DCMAKE_TOOLCHAIN_FILE=C:\Users\svenk\AppData\Local\Android\sdk\ndk\27.0.12077973\build\cmake\android.toolchain.cmake" ^
    "-DCMAKE_MAKE_PROGRAM=C:\Users\svenk\AppData\Local\Android\sdk\cmake\3.22.1\bin\ninja.exe" ^
    "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=D:\flutter\sana_rive\build\rive_native\intermediates\cxx\RelWithDebInfo\4b3d2d24\obj\arm64-v8a"
    ^
    "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=D:\flutter\sana_rive\build\rive_native\intermediates\cxx\RelWithDebInfo\4b3d2d24\obj\arm64-v8a"
    ^
    "-DCMAKE_BUILD_TYPE=RelWithDebInfo" ^
    "-BC:\Users\svenk\AppData\Local\Pub\Cache\hosted\pub.dev\rive_native-0.0.9\android\.cxx\RelWithDebInfo\4b3d2d24\arm64-v8a" ^
    -GNinja
    from C:\Users\svenk\AppData\Local\Pub\Cache\hosted\pub.dev\rive_native-0.0.9\android
    CMake Error at CMakeLists.txt:60 (message):
    rive_native: Failed to run setup command. Exit code: 1 : com.android.ide.common.process.ProcessException: -- The C compiler identification is Clang 18.0.1
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working C compiler: C:/Users/svenk/AppData/Local/Android/Sdk/ndk/27.0.12077973/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe

  • skipped
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- rive_native: CMake is running on Windows.
    -- rive_native: Inferred app root: D:\flutter\sana_rive
    -- rive_native setup output: [rive_native] Starting Rive Native Setup...

    [rive_native] Building rive_native with assumed project root in:
    [rive_native] D:\flutter\sana_rive\

    [rive_native] Using package:rive_native from C:\Users\svenk\AppData\Local\Pub\Cache\hosted\pub.dev\rive_native-0.0.9
    [rive_native] Found Flutter app root at: D:\flutter\sana_rive
    [rive_native] Initializing Rive Native for TargetPlatform.android. This may take some time the first time it is run.
    [rive_native] Downloading "android" libraries for version "0.0.9+2"
    [rive_native] URL: https://rive-flutter-artifacts.rive.app/rive_native_versions/0.0.9%2B2/rive_native_artifacts_android.zip
    [rive_native] HandshakeException: Handshake error in client (OS Error:
    CERTIFICATE_VERIFY_FAILED: unable to get local issuer certificate(../../third_party/boringssl/src/ssl/handshake.cc:295))
    [rive_native] #0 _SecureFilterImpl._handshake (dart:io-patch/secure_socket_patch.dart:101:46)
    Fix Pub Analysis #1 _SecureFilterImpl.handshake (dart:io-patch/secure_socket_patch.dart:146:25)
    Flutter app using Rive won't run in Flutter web debug mode #2 _RawSecureSocket._secureHandshake (dart:io/secure_socket.dart:1009:54)
    Improving controllers so they can mix animations more easily. #3 _RawSecureSocket._tryFilter (dart:io/secure_socket.dart:1139:19)

    -- Configuring incomplete, errors occurred!
    See also "C:/Users/svenk/AppData/Local/Pub/Cache/hosted/pub.dev/rive_native-0.0.9/android/.cxx/RelWithDebInfo/4b3d2d24/arm64-v8a/CMakeFiles/CMakeOutput.log".

    C++ build system [configure] failed while executing:
    @echo off
    "C:\Users\svenk\AppData\Local\Android\sdk\cmake\3.22.1\bin\cmake.exe" ^
    "-HC:\Users\svenk\AppData\Local\Pub\Cache\hosted\pub.dev\rive_native-0.0.9\android" ^
    "-DCMAKE_SYSTEM_NAME=Android" ^
    "-DCMAKE_EXPORT_COMPILE_COMMANDS=ON" ^
    "-DCMAKE_SYSTEM_VERSION=21" ^
    "-DANDROID_PLATFORM=android-21" ^
    "-DANDROID_ABI=arm64-v8a" ^
    "-DCMAKE_ANDROID_ARCH_ABI=arm64-v8a" ^
    "-DANDROID_NDK=C:\Users\svenk\AppData\Local\Android\sdk\ndk\27.0.12077973" ^
    "-DCMAKE_ANDROID_NDK=C:\Users\svenk\AppData\Local\Android\sdk\ndk\27.0.12077973" ^
    "-DCMAKE_TOOLCHAIN_FILE=C:\Users\svenk\AppData\Local\Android\sdk\ndk\27.0.12077973\build\cmake\android.toolchain.cmake" ^
    "-DCMAKE_MAKE_PROGRAM=C:\Users\svenk\AppData\Local\Android\sdk\cmake\3.22.1\bin\ninja.exe" ^
    "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=D:\flutter\sana_rive\build\rive_native\intermediates\cxx\RelWithDebInfo\4b3d2d24\obj\arm64-v8a"
    ^
    "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=D:\flutter\sana_rive\build\rive_native\intermediates\cxx\RelWithDebInfo\4b3d2d24\obj\arm64-v8a"
    ^
    "-DCMAKE_BUILD_TYPE=RelWithDebInfo" ^
    "-BC:\Users\svenk\AppData\Local\Pub\Cache\hosted\pub.dev\rive_native-0.0.9\android\.cxx\RelWithDebInfo\4b3d2d24\arm64-v8a" ^
    -GNinja
    from C:\Users\svenk\AppData\Local\Pub\Cache\hosted\pub.dev\rive_native-0.0.9\android

Steps To Reproduce

Steps to reproduce the behavior:
flutter run -d <device_id>
run flutter build apk

Expected behavior

It should run or build apk

Device & Versions (please complete the following information)

  • Device: [e.g. Android Emulator, iOS Simulator]
  • OS: [e.g. Android SDK API Level 30, iOS 14.5]
  • Flutter Version: Copy-paste the output of flutter --version
    e.g.:
Flutter 3.32.8 • channel stable • https://github.com/flutter/flutter.git
Framework • revision edada7c56e (3 weeks ago) • 2025-07-25 14:08:03 +0000
Engine • revision ef0cd00091 (3 weeks ago) • 2025-07-24 12:23:50 -0700
Tools • Dart 3.8.1 • DevTools 2.45.1

Additional context

<-- Add any other context about the problem here. -->

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions