Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug]: [stacked_themes] Incompatibility with AGP8 #1123

Open
undead-reaper opened this issue Sep 9, 2024 · 4 comments
Open

[bug]: [stacked_themes] Incompatibility with AGP8 #1123

undead-reaper opened this issue Sep 9, 2024 · 4 comments
Labels

Comments

@undead-reaper
Copy link

Describe the bug

Here's the error from VS Code:
`Launching lib\main.dart on Pixel 7 Pro in debug mode...

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring project ':flutter_statusbarcolor_ns'.

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 2s
Error: Gradle task assembleDebug failed with exit code 1
`

What operating system do you use?

Windows

Information about the installed tooling

[!] Flutter (Channel stable, 3.24.2, on Microsoft Windows [Version 10.0.22631.4112], locale en-US)
• Flutter version 3.24.2 on channel stable at C:\Users\User\fvm\default
! Warning: flutter on your path resolves to C:\Users\User\fvm\versions\stable\bin\flutter, which is not inside
your current Flutter SDK checkout at C:\Users\User\fvm\default. Consider adding C:\Users\User\fvm\default\bin
to the front of your path.
! Warning: dart on your path resolves to C:\Users\User\fvm\versions\stable\bin\dart, which is not inside your
current Flutter SDK checkout at C:\Users\User\fvm\default. Consider adding C:\Users\User\fvm\default\bin to
the front of your path.
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 4cf269e36d (6 days ago), 2024-09-03 14:30:00 -0700
• Engine revision a6bd3f1de1
• Dart version 3.5.2
• DevTools version 2.37.2
• If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly
to perform update checks and upgrades.

[✓] Windows Version (Installed version of Windows is version 10 or higher)

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
• Android SDK at C:\Users\User\AppData\Local\Android\sdk
• Platform android-35, build-tools 35.0.0
• Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
• Java version OpenJDK Runtime Environment (build 17.0.10+0--11609105)
• All Android licenses accepted.

[✓] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[✗] Visual Studio - develop Windows apps
✗ Visual Studio not installed; this is necessary to develop Windows apps.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all of its default components

[✓] Android Studio (version 2024.1)
• Android Studio at C:\Program Files\Android\Android Studio
• 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.10+0--11609105)

[✓] VS Code (version 1.93.0)
• VS Code at C:\Users\User\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.96.0

[✓] Connected device (4 available)
• Pixel 7 Pro (mobile) • 31031FDH3000Y5 • android-arm64 • Android 15 (API 35)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22631.4112]
• Chrome (web) • chrome • web-javascript • Google Chrome 128.0.6613.120
• Edge (web) • edge • web-javascript • Microsoft Edge 128.0.2739.54

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

! Doctor found issues in 2 categories.

Steps to reproduce the issue

  1. Add stacked_themes to a Flutter app dependencies.
  2. Try to run the app using flutter run.

Expected behavior

The app should run like usual.

Screenshots

No response

Additional Context

No response

@sebastianbuechler
Copy link
Contributor

Maybe a stupid question,but have you tried the mentioned fix in your error message?

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

Also, the steps to reproduce the issue are not reproducing the issue.

@undead-reaper
Copy link
Author

undead-reaper commented Sep 17, 2024

Yep I did try the mentioned fix but it's still not working, I even tried downgrading the gradle version but then I get other errors. And did you try to create the project on the flutter version I specified? Because I'm having this issue even on a completely blank and new app. Also I do have the namespace value in my flutter project and it's building fine without stacked_themes, it's only when I add it as a dependency that I get the error

@FilledStacks
Copy link
Contributor

@undead-reaper

That is a problem with the statusbar package, it's not been properly maintained for a while.

I'll add this to the list, not high priority so I might not get to it soon.

I'd say you can roll your own themese setup for now, I'm simply using sharedPReferences + provider to manage themese locally.

@FilledStacks FilledStacks added the p3 label Oct 2, 2024
@bdairy
Copy link

bdairy commented Oct 7, 2024

Same issue here,, My app is running and got updated,, with the statusbar package issue,,, any plan to fix soon? Thanks

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

No branches or pull requests

4 participants