Skip to content
This repository has been archived by the owner on Jul 11, 2024. It is now read-only.

Build failed on android #85

Open
justChris opened this issue Oct 11, 2023 · 6 comments
Open

Build failed on android #85

justChris opened this issue Oct 11, 2023 · 6 comments

Comments

@justChris
Copy link

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!
@Aqitaniya
Copy link

the same issue

@gaabrielricci
Copy link

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

#86

@taufiq-husain
Copy link

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

#86

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

@gaabrielricci
Copy link

gaabrielricci commented Oct 24, 2023

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

@valentinozegna
Copy link

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

@Mounix99
Copy link

Could be temporary fixed with this ref to package

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants