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

Flutter project can't run after I installed sms_advanced. #46

Open
AvitBrian opened this issue Oct 15, 2024 · 2 comments
Open

Flutter project can't run after I installed sms_advanced. #46

AvitBrian opened this issue Oct 15, 2024 · 2 comments

Comments

@AvitBrian
Copy link

Hi!!!
Flutter version:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, 3.27.0-1.0.pre.36, on Fedora Linux 40 (Workstation Edition) 6.10.12-200.fc40.x86_64, locale en_GB.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[!] Android Studio (not installed)
[✓] VS Code (version 1.94.2)
[✓] Connected device (3 available)
[✓] Network resources

after i added sms_advanced i get this build error:

FAILURE: Build failed with an exception.

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

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.

please let me know if you need further details, I am new sending in issues on github so I'm not really sure what other information could be helpful to debug this.

@alvarogabrielgomez
Copy link

Same here

@jake-dev-99
Copy link

This is caused by new requirements with Android SDK 35 and can be patched by adding the namespace to the build.gradle file in $HOME/.pub-cache/hosted/pub.dev/sms_advanced-1.1.0 (or wherever your pub cache is located). Not best practices, but allows it to build successfully.

android {
    namespace 'com.elyudde.sms_advanced'
    ...
}

A better option would be to fork this repo and add it to your pubspec.yaml:

  sms_advanced:
    git:
      url: https://github.com/YOURNAMEHERE/sms_advanced.git
      ref: master

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

No branches or pull requests

3 participants