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

Incorrect package="com.reactnativecommunity.geolocation" found in source AndroidManifest.xml: #310

Closed
paulintrognon opened this issue Apr 30, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@paulintrognon
Copy link

paulintrognon commented Apr 30, 2024

If I understood correctly, with Android Gradle Plugin > 8.0.0, you just need to remove the namespace from the AndroidManifest.xml

Refs: react-native-community/discussions-and-proposals#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

  • Android:
  • react-native-geolocation-service: 5.3.1
  • react-native: 0.74.0
  • react: 18.3.1

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.

@paulintrognon paulintrognon added the bug Something isn't working label Apr 30, 2024
@paulintrognon paulintrognon reopened this Apr 30, 2024
@paulintrognon
Copy link
Author

In fact adding namespace to my own package fixed it.

@Himatheja
Copy link

  • 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants