Setting the namespace via the package attribute in the source AndroidManifest.xml is no longer supported. Recommendation: remove package="com.coinbase.flutter.wallet_sdk"
Describe the bug I'm trying to run my application after adding the package to pubspecs.yaml. the gradle exits with a build error described as below:
Setting the namespace via the package attribute in the source AndroidManifest.xml is no longer supported.
Recommendation: remove package="com.coinbase.flutter.wallet_sdk" from the source AndroidManifest.xml: C:\Users\username\AppData\Local\Pub\Cache\hosted\pub.dev\coinbase_wallet_sdk-1.0.9\android\src\main\AndroidManifest.xml.
I'm using android studio koala 2024.1.1 patch 1 with updated sdks flutter doctor is as below:
[√] Flutter (Channel stable, 3.22.3, on Microsoft Windows [Version 10.0.22631.3880], locale en-US)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[√] Chrome - develop for the web
[X] Visual Studio - develop Windows apps
X 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)
[√] VS Code (version 1.92.0)
[√] Connected device (4 available)
[√] Network resources
! Doctor found issues in 1 category.
the error is for coinbase sdk but I have not used the coinbase sdk as it is used on Web3ModalFlutter my project depends on it too. I don't want to use coinbase wallet either is there a way to bypass this error?
Hello @nimashahahmadian! First time I see this error. Which version are you trying to install?
hey @quetool thanks for the fast reply. I'm using web3modal_flutter: ^3.3.0 and coinbase sdk used version is 1.0.9
But are you also installing coinable_wallet_sdk?
no it's getting installed by the web3modal_flutter
Yes, I thought you were installing it separately
android manifest was like below:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.coinbase.flutter.wallet_sdk">
</manifest>
i changed it to:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
>
</manifest>
now the app runs but W3MConnectWalletButton is deactivated with grey color
Can you share your pubspec.yml?
version: 1.0.0
environment:
sdk: ">=2.17.5 <=3.4.4"
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
rxdart: ^0.27.7
path_provider: ^2.1.4
hydrated_bloc: ^9.1.5
cupertino_icons: ^1.0.8
intl: ^0.19.0
logger: ^2.2.0
shared_preferences: ^2.2.3
uuid: ^4.4.2
crypton: ^2.2.1
device_info_plus: ^10.1.1
dio: ^5.5.0
html_unescape: ^2.0.0
provider: ^6.1.2
flutter_bloc: ^8.1.6
bloc: ^8.1.4
equatable: ^2.0.5
flutter_spinkit: ^5.2.1
encrypt: ^5.0.3
flutter_svg: ^2.0.10
fluttertoast: ^8.2.6
cached_network_image: ^3.3.1
flutter_cache_manager: ^3.3.0
file: ^7.0.0
video_player: ^2.9.1
webview_flutter: ^4.8.0
connectivity_plus:
git:
url: https://github.com/fluttercommunity/plus_plugins.git
path: packages/connectivity_plus/connectivity_plus
ref: cf7d93fbfc76830acf2db755543cf4235a49df60
timezone: ^0.9.4
text_scroll: ^0.2.0
shaun_app_core:
path: ../shaun_lib
shaun_emoj_keyboard:
# path: ../../shaun_emoj_keyboard
git: https://gitlab.com/trongnhantaisacventoan/shaun_emoj_keyboard.git
#extra
smooth_page_indicator: ^1.2.0
flutter_image_compress: ^1.1.3
image_picker: ^1.1.2
custom_refresh_indicator: ^4.0.1
extended_nested_scroll_view: ^6.2.1
url_launcher: ^6.3.0
# photo_view:
# git: https://github.com/trongnhantaisacventoan/photo_view.git
photo_view: ^0.15.0
modal_bottom_sheet: ^3.0.0
badges: ^3.1.2
flutter_keyboard_visibility: ^6.0.0
audioplayers: ^6.0.0
ffmpeg_kit_flutter_min_gpl: 6.0.3-LTS
wakelock: ^0.6.2
chewie:
# path: ../../chewie
git:
url: https://github.com/trongnhantaisacventoan/chewie.git
ref: fix1
# chewie: ^1.8.1
video_compress: ^3.1.2
flutter_xlider: ^3.5.0
image_cropper: ^8.0.1
file_picker: ^8.0.6
dotted_border: ^2.1.0
firebase_core: ^3.3.0
firebase_messaging: ^15.0.4
flutter_local_notifications: ^14.1.0
dismissible_page: ^1.0.2
dart_pusher_channels: ^1.2.2
flutter_inappwebview: ^6.0.0
uni_links: ^0.5.1
# google_mobile_ads: ^5.1.0
image: ^4.1.3
# flutter_sharing_intent:
# # path: ../../flutter_sharing_intent
# git:
# url: https://github.com/trongnhantaisacventoan/flutter_sharing_intent.git
# ref: fix1
flutter_sharing_intent: ^1.1.1
# youtube
youtube_player_flutter: ^9.0.0
open_filex: ^4.4.0
in_app_purchase: ^3.2.0
walletconnect_flutter_v2: ^2.3.0
fl_chart: ^0.68.0
qr_flutter: ^4.1.0
web3modal_flutter: ^3.3.0
here you go
Allow me some time to investigate but honestly this seems to be an issue with your dependencies. If I were you I would start by reducing the amount of dependencies (do you really need them all?), they are really too much and will make it really hard to debug possible conflicts (not to mention maintaining your project). Also, you don't need these 3 together:
walletconnect_flutter_v2: ^2.3.0
qr_flutter: ^4.1.0
web3modal_flutter: ^3.3.0
For Web3Modal you just need web3modal_flutter: ^3.3.0
Could you please start a brand new project, install just web3modal_flutter: ^3.3.0, and check if you have the same issue in that case?
So your dependencies in pubspec.yml in this new project should look like this:
dependencies:
flutter:
sdk: flutter
web3modal_flutter: ^3.3.0
dev_dependencies:
flutter_test:
sdk: flutter
Hello @nimashahahmadian, we are still discussing this with Coinbase team, did you try my last suggestion in the meantime?
Hello @nimashahahmadian, could you try adding this in your pubspec file, then run flutter clean && flutter pub get and check if with this fix you overcome the issue?
dependency_overrides:
coinbase_wallet_sdk:
git:
url: https://github.com/WalletConnect/wallet-mobile-sdk.git
path: flutter
ref: beba5b377e32554f5c00ee08c4df509d9078dbf1
hey @quetool. sorry for late response. well as I mentioned I did not need coinbase sdk in my app so I kind of bypassed it by some changes to the package thanks for keeping up. Actually, I'm a bit busy at the moment but I will check the stuff you mentioned on first chance I get to. Thanks for the support. best regards mate.
Appreciate @nimashahahmadian! Let me know if I can be of help with anything else!