michalchudziak / react-native-geolocation

Geolocation APIs for React Native

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

paulintrognon opened this issue · comments

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.

In fact adding namespace to my own package fixed it.