flutter_app_badger icon indicating copy to clipboard operation
flutter_app_badger copied to clipboard

Build failed on android

Open justChris opened this issue 1 year ago • 6 comments

Build is failing on the newest gradle/ jdk version with the following message:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':flutter_app_badger'.
> Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl.
   > Namespace not specified. Specify a namespace in the module's build file. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the namespace.

     If you've specified the package attribute in the source AndroidManifest.xml, you can use the AGP Upgrade Assistant to migrate to the namespace value in the build file. Refer to https://d.android.com/r/tools/upgrade-assistant/agp-upgrade-assistant for general information about using the AGP Upgrade Assistant.

* 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 22s
Exception: Gradle task assembleDebug failed with exit code 1

flutter doctor:

flutter doctor -v                                    
[✓] Flutter (Channel stable, 3.13.6, on macOS 14.0 23A344 darwin-x64, locale en-US)
    • Flutter version 3.13.6 on channel stable at /Users/chris/Flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ead455963c (2 weeks ago), 2023-09-26 18:28:17 -0700
    • Engine revision a794cf2681
    • Dart version 3.1.3
    • DevTools version 2.25.0

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    • Android SDK at /Users/chris/Library/Android/sdk
    • Platform android-33, build-tools 33.0.1
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15A240d
    • CocoaPods version 1.13.0

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

[✓] Android Studio (version 2022.3)
    • 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 17.0.6+0-17.0.6b829.9-10027231)

[✓] VS Code (version 1.83.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.74.0

[✓] Connected device (5 available)
    • sdk gphone64 x86 64 (mobile) • emulator-5554                        • android-x64    • Android 13 (API 33) (emulator)
    • iPhone (mobile)              • 00008030-00020DD43E91802E            • ios            • iOS 17.0.3 21A360
    • iPhone 15 Pro (mobile)       • 5EF2ADC0-C7D8-4BAD-971D-F15244D96A27 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-17-0 (simulator)
    • macOS (desktop)              • macos                                • darwin-x64     • macOS 14.0 23A344 darwin-x64
    • Chrome (web)                 • chrome                               • web-javascript • Google Chrome 117.0.5938.149

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

• No issues found!

justChris avatar Oct 11 '23 06:10 justChris

the same issue

Aqitaniya avatar Oct 18 '23 15:10 Aqitaniya

i solve it in this pull request, just wait the aprovation

https://github.com/g123k/flutter_app_badger/pull/86

gaabrielricci avatar Oct 18 '23 18:10 gaabrielricci

i solve it in this pull request, just wait the aprovation

#86

How do I use this version? When will it be approved?

taufiq-husain avatar Oct 20 '23 20:10 taufiq-husain

you can use my fork. But need to download the code and reference locally on your pubspec.yaml

only @g123k can aprove this.

https://github.com/gaabrielricci/flutter_app_badger/tree/upgrade_android_gradle_plugin

gaabrielricci avatar Oct 24 '23 19:10 gaabrielricci

This can be fixed by adding the namespace to the build.gradle file of flutter_app_badger, as I indicated in this other open issue

valentinozegna avatar Dec 14 '23 16:12 valentinozegna

Could be temporary fixed with this ref to package

  flutter_app_badger:
    git:
      url: https://github.com/g123k/flutter_app_badger.git
      ref: 33cbee6

Mounix99 avatar Jan 17 '24 12:01 Mounix99