Gps location error while creating apk file ionic vue?

I am trying to generate apk file it is giving same error everytime.

Executing tasks: [:app:assembleDebug] in project C:\projects\siloc-ionic-app\android

> Configure project :app
google-services.json not found, google-services plugin not applied. Push Notifications won't work

> Task :app:preBuild UP-TO-DATE
> Task :app:preDebugBuild UP-TO-DATE
> Task :capacitor-android:preBuild UP-TO-DATE
> Task :capacitor-android:preDebugBuild UP-TO-DATE
> Task :capacitor-cordova-android-plugins:preBuild UP-TO-DATE
> Task :capacitor-cordova-android-plugins:preDebugBuild UP-TO-DATE
> Task :capacitor-cordova-android-plugins:compileDebugAidl NO-SOURCE
> Task :capacitor-android:packageDebugRenderscript NO-SOURCE

> Task :capacitor-cordova-android-plugins:processDebugManifest
C:\projects\siloc-ionic-app\android\capacitor-cordova-android-plugins\src\main\AndroidManifest.xml:10:60-92 Error:
	Attribute uses-feature#android.hardware.location.gps@required at AndroidManifest.xml:10:60-92 has an illegal value=($GPS_REQUIRED), expected 'true' or 'false'
C:\projects\siloc-ionic-app\android\capacitor-cordova-android-plugins\src\main\AndroidManifest.xml Error:
	Validation failed, exiting

See for more information about the manifest merger.

> Task :capacitor-android:compileDebugJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

> Task :capacitor-cordova-android-plugins:javaPreCompileDebug
> Task :capacitor-cordova-android-plugins:processDebugManifest FAILED
> Task :capacitor-android:bundleLibCompileDebug

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':capacitor-cordova-android-plugins:processDebugManifest'.
> A failure occurred while executing$ActionFacade
   > Manifest merger failed with multiple errors, see logs

* 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

16 actionable tasks: 16 executed

It is showing that i have line in AndroidManifest.xml

<uses-feature android:name="android.hardware.location.gps" android:required="$GPS_REQUIRED"/>

But Actually line is

 <uses-feature android:name="android.hardware.location.gps" />

I don’t know why its displaying this

I added this android:required="$GPS_REQUIRED" yesterday but don’t why it appearing here looks like its cache.

1 Like

is this for capacitor or cordova?

I am using capacitor for geolocation. but error message showing something is wrong with cordova

Waiting for response sir

My friend put “true” in “$GPS_REQUIRED”, and “Rebuild Proyect”, and then you can create the apk.

1 Like

yes i figured it out. but don’t know why when i run npx cap sync it again added $GPS_REQUIRED

Yes, always has to put true…

1 Like

Thanks . Can you help me out with PushNotification with firebase there is no heling material available for vue ionic