Skip to content

[cupertino_http] Build fails on Flutter 3.38.5: "Android NDK Clang could not be found" #1867

@MatteoBax

Description

@MatteoBax

I know that cupertino_http is not intended for Android, however it still compiled correctly in previous Flutter versions.
The dependency is required because the app targets both iOS and Android, and I can't remove it..
I originally filed this issue in the Flutter repository, but I was redirected here.
flutter/flutter#180163

Steps to reproduce

Build the project with flutter build apk --release

Expected results

The APK generation.

Actual results

The command flutter build apk --release fails with: Android NDK Clang could not be found..
The problem does not occur if I remove the cupertino_http dependency or use Flutter version 3.35.7.

Code sample

Since the code for this issue is irrelevant, I'm attaching the pubspec.yaml.

pubspec.yaml
name: prova_deps
description: "A new Flutter project."
# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.0.0+1

environment:
  sdk: ^3.9.2

# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
# consider running `flutter pub upgrade --major-versions`. Alternatively,
# dependencies can be manually updated by changing the version numbers below to
# the latest version available on pub.dev. To see which dependencies have newer
# versions available, run `flutter pub outdated`.
dependencies:
  flutter:
    sdk: flutter

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^1.0.8
  http: ^1.6.0
  provider: ^6.1.5
  auto_scroll_text: ^0.0.7
  cupertino_http: ^2.4.0
  dio: ^5.9.0
  cookie_jar: ^4.0.8
  dio_cookie_manager: ^3.3.0
  shared_preferences: ^2.5.4
  simple_dns_client:
    path: "/media/matteo/Dati/dart projects/simple_dns_client"
  package_info_plus: ^9.0.0
  synchronized: ^3.4.0
  reorderables: ^0.6.0
  audio_service: ^0.18.18
  taudio: ^10.3.8
  fluttertoast: ^9.0.0
  crypto: ^3.0.6
  sqflite: ^2.4.2
  path_provider: ^2.1.5
  mutex: ^3.1.0
  flutter_image_cache: ^1.0.2
  objectbox_flutter_libs: ^5.1.0
  objectbox: ^5.1.0

dev_dependencies:
  flutter_test:
    sdk: flutter

  # The "flutter_lints" package below contains a set of recommended lints to
  # encourage good coding practices. The lint set provided by the package is
  # activated in the `analysis_options.yaml` file located at the root of your
  # package. See that file for information about deactivating specific lint
  # rules and activating additional ones.
  flutter_lints: ^6.0.0

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

# The following section is specific to Flutter packages.
flutter:

  # The following line ensures that the Material Icons font is
  # included with your application, so that you can use the icons in
  # the material Icons class.
  uses-material-design: true

  # To add assets to your application, add an assets section, like this:
  # assets:
  #   - images/a_dot_burr.jpeg
  #   - images/a_dot_ham.jpeg

  # An image asset can refer to one or more resolution-specific "variants", see
  # https://flutter.dev/to/resolution-aware-images

  # For details regarding adding assets from package dependencies, see
  # https://flutter.dev/to/asset-from-package

  # To add custom fonts to your application, add a fonts section here,
  # in this "flutter" section. Each entry in this list should have a
  # "family" key with the font family name, and a "fonts" key with a
  # list giving the asset and other descriptors for the font. For
  # example:
  # fonts:
  #   - family: Schyler
  #     fonts:
  #       - asset: fonts/Schyler-Regular.ttf
  #       - asset: fonts/Schyler-Italic.ttf
  #         style: italic
  #   - family: Trajan Pro
  #     fonts:
  #       - asset: fonts/TrajanPro.ttf
  #       - asset: fonts/TrajanPro_Bold.ttf
  #         weight: 700
  #
  # For details regarding fonts from package dependencies,
  # see https://flutter.dev/to/font-from-package

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

output.log

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.38.5, on Debian GNU/Linux 13 (trixie)
    6.12.57+deb13-amd64, locale it_IT.UTF-8) [399ms]
    • Flutter version 3.38.5 on channel stable at /home/matteo/sdk/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f6ff1529fd (9 giorni fa), 2025-12-11 11:50:07 -0500
    • Engine revision 1527ae0ec5
    • Dart version 3.10.4
    • DevTools version 2.51.1
    • Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop,
      enable-windows-desktop, enable-android, enable-ios, cli-animations,
      enable-native-assets, omit-legacy-version-file, enable-lldb-debugging

[✓] Android toolchain - develop for Android devices (Android SDK version 36.0.0)
    [10,0s]
    • Android SDK at /home/matteo/sdk/android
    • Emulator version 36.3.10.0 (build_id 14472402) (CL:N/A)
    • Platform android-36, build-tools 36.0.0
    • Java binary at: /snap/android-studio/209/jbr/bin/java
      This is the JDK bundled with the latest Android Studio installation on
      this machine.
      To manually set the JDK path, use: `flutter config
      --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 21.0.7+-13880790-b1038.58)
    • All Android licenses accepted.

[✓] Chrome - develop for the web [59ms]
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop [1.480ms]
    • Debian clang version 19.1.7 (3+b1)
    • cmake version 3.31.6
    • ninja version 1.12.1
    • pkg-config version 1.8.1
    • OpenGL core renderer: Mesa Intel(R) UHD Graphics (CML GT2) (X11)
    • OpenGL core version: 4.6 (Core Profile) Mesa 25.0.7-2 (X11)
    • OpenGL core shading language version: 4.60 (X11)
    • OpenGL ES renderer: Mesa Intel(R) UHD Graphics (CML GT2) (X11)
    • OpenGL ES version: OpenGL ES 3.2 Mesa 25.0.7-2 (X11)
    • OpenGL ES shading language version: OpenGL ES GLSL ES 3.20 (X11)
    • GL_EXT_framebuffer_blit: yes (X11)
    • GL_EXT_texture_format_BGRA8888: yes (X11)

[✓] Connected device (2 available) [619ms]
    • Linux (desktop) • linux  • linux-x64      • Debian GNU/Linux 13 (trixie)
      6.12.57+deb13-amd64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 143.0.7499.169

[✓] Network resources [1.765ms]
    • All expected network resources are available.

• No issues found!

Metadata

Metadata

Assignees

Labels

package:cupertino_httpIssues related to package:cupertino_httptype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions