Closed paulintrognon closed 5 months ago
In fact adding namespace to my own package fixed it.
What went wrong: A problem occurred configuring project ':react-native-community_geolocation'.
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.
React Native Version: 0.72.14
Java: 17
Gradle: gradle-8.2-all
Kotlin: 1.9.20
If I understood correctly, with Android Gradle Plugin > 8.0.0, you just need to remove the namespace from the AndroidManifest.xml
Refs: https://github.com/react-native-community/discussions-and-proposals/issues/671
Environment
System: OS: Linux 5.15 Ubuntu 20.04.6 LTS (Focal Fossa) CPU: (12) x64 Intel(R) Core(TM) i7-10850H CPU @ 2.70GHz Memory: 15.56 GB / 30.95 GB Shell: version: 5.0.17 path: /bin/bash Binaries: Node: version: 20.12.2 path: ~/.nvm/versions/node/v20.12.2/bin/node Yarn: version: 1.22.19 path: ~/.yarn/bin/yarn npm: version: 10.5.0 path: ~/.nvm/versions/node/v20.12.2/bin/npm Watchman: version: 20210821.022905.0 path: /usr/local/bin/watchman SDKs: Android SDK: Not Found IDEs: Android Studio: AI-213.7172.25.2113.9123335 Languages: Java: version: 17.0.10 path: /usr/bin/javac Ruby: Not Found npmPackages: "@react-native-community/cli": Not Found react: installed: 18.3.1 wanted: 18.3.1 react-native: installed: 0.74.0 wanted: 0.74.0 npmGlobalPackages: "react-native": Not Found Android: hermesEnabled: true newArchEnabled: false iOS: hermesEnabled: true newArchEnabled: false
Platforms
Android
Versions
Description
FAILURE: Build failed with an exception. What went wrong: Execution failed for task ':react-native-community_geolocation:processDebugManifest'. A failure occurred while executing com.android.build.gradle.tasks.ProcessLibraryManifest$ProcessLibWorkAction Incorrect package="com.reactnativecommunity.geolocation" found in source AndroidManifest.xml: /home/paulin/DriverApp/node_modules/@react-native-community/geolocation/android/src/main/AndroidManifest.xml. Setting the namespace via the package attribute in the source AndroidManifest.xml is no longer supported. Recommendation: remove package="com.reactnativecommunity.geolocation" from the source AndroidManifest.xml: /home/paulin/DriverApp/node_modules/@react-native-community/geolocation/android/src/main/AndroidManifest.xml.