Android Map view does'nt work (white screen)

619 views Asked by At

I devleop an app which one of its abilities is to view a map and display nearby places (does not matter really what it displays).

for my convenience - i coded it in separate project. after i copied the code (with all of the resources) to the main app, and tried to display the map, I could not see the map at all. instead, i saw default white screen.

I generated the suitable keys (API and server) for every project, and enabled the needed API's (seperately):

BigQuery API.

Debuglet Controller API.

Google Cloud Logging API.

Google Cloud SQL.

Google Cloud Storage.

Google Cloud Storage JSON API.

Google Maps Android API v2.

Google Maps Geolocation API.

Google Places API for Android.

Google Places API Web Service.

and this is my androidManifest.xml

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

<uses-sdk android:minSdkVersion="16"
          android:maxSdkVersion="22"/>

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.NETWORK" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>

<uses-permission android:name="android.permission.WRITE_CALENDAR" />
<uses-permission android:name="android.permission.READ_CALENDAR" />

<uses-feature
    android:glEsVersion="0x00020000"
    android:required="true"/>

<application
    android:allowBackup="true"
    android:icon="@mipmap/icon_mykehila"
    android:label="@string/app_name"
    android:theme="@style/AppTheme"
    >
    <activity
        android:name=".MainActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    ....
    ....
    ....
    <meta-data
        android:name="com.google.android.gms.version"
        android:value="@integer/google_play_services_version" />
    <meta-data
        android:name="com.google.android.maps.v2.API_KEY"
        android:value="@string/google_maps_key" />

    <activity
        android:name=".Maps.MapsActivity"
        android:label="@string/title_activity_maps" >
    </activity>
    ...
    ....
</application>

The weirdest thing is that it works perfectly on the small app, but not on the main app when I try to run it from there.

What can it be?

1

There are 1 answers

2
binyamina On BEST ANSWER

The only way to solve it was to Edit allowed android applications in the console to "Any application allowed".

I don't know why but this was the only way.