shorebirdtech / shorebird

Code Push for Flutter and other tools for Flutter businesses.
https://shorebird.dev
Other
2.31k stars 140 forks source link

fix: Unable to generate release aar (shorebird release aar --release-version 1.0.0+1) #2091

Closed vineetpal88 closed 5 months ago

vineetpal88 commented 5 months ago

App ID: com.shout.dating

I am implementing a shorebird for hybrid android app. I imported flutter module in my android app. I open PowerShell and go to flutter module and run this command (shorebird release aar --release-version 1.0.0+1) but this command give me error: PS D:\shoutproject\DatingFlutterCode3Shore\datingapp\shout2> shorebird release aar --release-version 1.0.28+29 ✓ Fetching apps (0.6s) ⠸ Building aar with Flutter 3.19.6 (4b22a31bd9)... (16.4s)Failed to build aar: Instance of 'ArtifactBuildException' Screenshot 2024-05-14 134028

vineetpal88 commented 5 months ago

@bryanoltman @erickzanardo Can you please help me on this?

bryanoltman commented 5 months ago

Does flutter build aar work with Flutter 3.19.6?

vineetpal88 commented 5 months ago

aftr running flutter build aar got this error: PS D:\shoutproject\DatingFlutterCode3Shore\datingapp\shout2> flutter build aar

Running Gradle task 'assembleAarDebug'... 7.4s

You are applying Flutter's app_plugin_loader Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/go/flutter-gradle-plugin-apply

You are applying Flutter's main Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugin s with the declarative plugins block: https://flutter.dev/go/flutter-gradle-plugin-apply

FAILURE: Build failed with an exception.

Where: Initialization script 'D:\flutter_sdk\flutter_windows_3.13.1-stable\flutter\packages\flutter_tools\gradle\aar_init_script.gradle' line: 129

What went wrong: Failed to notify build listener. assert moduleProject != null | | null false

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 7s

Gradle task assembleAarDebug failed with exit code 1.

bryanoltman commented 5 months ago

After some discussion on Discord, @vineetpal88 mentioned that they have integrated Flutter into their Android app using the "Module source code" method mentioned in https://docs.flutter.dev/add-to-app/android/project-setup#integrate-your-flutter-module. Shorebird does not yet support this mode of hybrid Android app.

erickzanardo commented 5 months ago

@bryanoltman should we close this issue in favor of a new one specific about adding this mode that we don't support?

bryanoltman commented 5 months ago

@erickzanardo yeah, I think that'd be best

erickzanardo commented 5 months ago

Closing this in favor of #2168