question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error setting up GoogleMaps API key when using with VueJS.

See original GitHub issue

Hello everybody!

I’m getting an error when I try to set the the api key in the xml files as in the documentation. nativescript_googlemaps_api_key.xml <?xml version="1.0" encoding="utf-8"?> <resources> <string name="nativescript_google_maps_api_key">Here I have my the API-KEY without quotes</string> </resources>

Then I add the piece of code in the AndroidManifest.xml file: <meta-data android:name="com.google.android.geo.API_KEY" android:value="@string/nativescript_google_maps_api_key" />

Probably I’m missing something… Hope you can help me!

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
saul-avikarcommented, Jul 10, 2018

You should post your error code…

Try follow the steps under npm here: https://organicdesign.nz/User:Saul/nativescript#npm

0reactions
fran8narfcommented, Jul 12, 2018

Hi @saul-avikar,

I managed to solved the issue, it seems that my AndroidManifest.xml file was incomplete. I added several lines that I found and now it works.

This is the file now:

`

<?xml version="1.0" encoding="utf-8"?>

<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="__PACKAGE__" android:versionCode="1" android:versionName="1.0">

<supports-screens
	android:smallScreens="true"
	android:normalScreens="true"
	android:largeScreens="true"
	android:xlargeScreens="true"/>

<uses-sdk
	android:minSdkVersion="17"
	android:targetSdkVersion="__APILEVEL__"/>

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>

<application
	android:name="com.tns.NativeScriptApplication"
	android:allowBackup="true"
	android:icon="@drawable/icon"
	android:label="@string/app_name"
	android:theme="@style/AppTheme" >
	<activity
		android:name="com.tns.NativeScriptActivity"
		android:label="@string/title_activity_kimera"
		android:configChanges="keyboardHidden|orientation|screenSize">

			<intent-filter>
			<action android:name="android.intent.action.MAIN" />

			<category android:name="android.intent.category.LAUNCHER" />
		</intent-filter>
	</activity>
	<activity android:name="com.tns.ErrorReportActivity"/>

    <meta-data
        android:name="com.google.android.geo.API_KEY"
        android:value="@string/nativescript_google_maps_api_key" />
</application>

</manifest>`

Read more comments on GitHub >

github_iconTop Results From Across the Web

Vue Google Maps - JavaScript API error
*edit i just noticed that this issue is happening when i try to load the api key from my .env file. when i...
Read more >
Variable API Key? Or set API key from Vue instance? #135
My goal is to dynamically set the API key used by VueGoogleMaps. VueGoogleMaps currently loads with a static-key in main.js. I would like...
Read more >
How To Use Google Maps in Vue with vue-google-maps
Learn how to create an embedded Google Map with search and autocomplete support in Vue with vue-google-maps.
Read more >
Vuejs & Google Maps API 1 HOUR Course - YouTube
In this Vue.js and Google Maps API 1 Hour course, You're going to build a Location Detector App from start to finish from...
Read more >
Error Messages | Maps JavaScript API
This behavior typically indicates issues with either an API key or billing. In order to use Google Maps Platform products, billing must be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found