plus_plugins icon indicating copy to clipboard operation
plus_plugins copied to clipboard

[Bug]: Build failed with an exception when trying to build apk or bundle in android [android_intent_plus:generateReleaseLintModel]

Open taqi92 opened this issue 10 months ago • 0 comments

Platform

Android 14

Plugin

Android_intent_plus

Version

5.3.0flut

Flutter SDK

3.29.0

Steps to reproduce

  1. Added plugin in yaml
  2. App stops with follwoing error when trying to build APK

Code Sample

try {
              final intent = AndroidIntent(
                  action: 'android.intent.action.VIEW',
                  data: AppInfoService()
                              .deviceInfo["device_model"]
                              ?.toLowerCase() ==
                          'samsung'
                      ? 'esimmanagerfromqr://launch?CODE=$activationCode'
                      : activationCode);
              await intent.launch();
            } on PlatformException catch (e, s) {
              AppLogger.error(
                'Failed to launch ${e.toString()}',
              );

              if (context.mounted) {
                GeneralBottomSheet.show(
                  context: context,
                  title: l10n.installation_failed,
                  body: simInstallationFailedWidgetOption(
                      l10n, context, qrCode, activationCode, smdppAdress),
                );
              }
            }

Logs

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':android_intent_plus:generateReleaseLintModel'.
> Could not resolve all files for configuration ':android_intent_plus:releaseUnitTestRuntimeClasspath'.
   > Failed to transform bcprov-jdk18on-1.78.1.jar (org.bouncycastle:bcprov-jdk18on:1.78.1) to match attributes {artifactType=processed-jar, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Execution failed for JetifyTransform: /Users/taqi/.gradle/caches/modules-2/files-2.1/org.bouncycastle/bcprov-jdk18on/1.78.1/39e9e45359e20998eb79c1828751f94a818d25f8/bcprov-jdk18on-1.78.1.jar.
         > Failed to transform '/Users/taqi/.gradle/caches/modules-2/files-2.1/org.bouncycastle/bcprov-jdk18on/1.78.1/39e9e45359e20998eb79c1828751f94a818d25f8/bcprov-jdk18on-1.78.1.jar' using Jetifier. Reason: IllegalArgumentException, message: Unsupported class file major version 65. (Run with --stacktrace for more details.)
           Suggestions:
            - Check out existing issues at https://issuetracker.google.com/issues?q=componentid:460323&s=modified_time:desc, it's possible that this issue has already been filed there.
            - If this issue has not been filed, please report it at https://issuetracker.google.com/issues/new?component=460323 (run with --stacktrace and provide a stack trace if possible).

* 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.

Flutter Doctor

[✓] Flutter (Channel stable, 3.29.0, on macOS 15.3.1 24D70 darwin-arm64, locale en-US) [729ms]
    • Flutter version 3.29.0 on channel stable at /Users/taqi/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 35c388afb5 (9 weeks ago), 2025-02-10 12:48:41 -0800
    • Engine revision f73bfc4522
    • Dart version 3.7.0
    • DevTools version 2.42.2

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.1) [1,879ms]
    • Android SDK at /Users/taqi/Library/Android/sdk
    • Platform android-35, build-tools 35.0.1
    • Java binary at: /opt/homebrew/opt/openjdk@21/bin/java
      This JDK is specified in your Flutter configuration.
      To change the current JDK, run: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment Homebrew (build 21.0.6)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.2) [1,600ms]
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16C5032a
    • CocoaPods version 1.16.2

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

[✓] Android Studio (version 2024.2) [7ms]
    • 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 21.0.5+-13047016-b750.29)

[✓] VS Code (version 1.97.0) [6ms]
    • VS Code at /Users/taqi/download m1/Visual Studio Code.app/Contents
    • Flutter extension version 3.108.0

[✓] Connected device (4 available) [5.7s]
    • Pixel 6 (mobile)                • 1C011FDF6007E4        • android-arm64  • Android 14 (API 34)
    • macOS (desktop)                 • macos                 • darwin-arm64   • macOS 15.3.1 24D70 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin         • macOS 15.3.1 24D70 darwin-arm64
    • Chrome (web)                    • chrome                • web-javascript • Google Chrome 135.0.7049.85
    ! Error: Browsing on the local area network for Taqi's iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area network as
      this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)

[✓] Network resources [1,495ms]
    • All expected network resources are available.

• No issues found!

Checklist before submitting a bug

  • [x] I searched issues in this repository and couldn't find such bug/problem
  • [x] I Google'd a solution and I couldn't find it
  • [x] I searched on StackOverflow for a solution and I couldn't find it
  • [x] I read the README.md file of the plugin
  • [x] I'm using the latest version of the plugin
  • [x] All dependencies are up to date with flutter pub upgrade
  • [x] I did a flutter clean
  • [x] I tried running the example project

taqi92 avatar Apr 16 '25 07:04 taqi92