MAPS API - application not running on the emulator - android

I'm verry new at android developement , i'm trying to make a map application but can't even show a simple map on a fragment .
I've followed many & many tutorials , search a lot of answers in stackoverflow but still can't get the result i want .
I'm developping in eclipse and running app in emulator , i created a list of emulators to test on them but no one could show me the Map fragment.
The current AVDs that i have now are:
NEXUS S with ARMEABI V7 image system API 22
NEXUS S with Google API's intel Atom 86 API 22
Google NEXUS S with Google API's ARM API 22
All theese 3 don't have google play services and can't even install it on them (the tutorials i've watched not worked).
The last AVD that i could install Google play services in is the NEXUS S with ARM v7 image system API 17, i've google play services 12-5-18-000300-188802357 working fine and i've installed googleFrameWork and google play store(keep crashing even when update it )
The continious message i'm getting in this later is "Google play services are updating" ,everytime i try update the google play services , the app crash and stopped immediately .
This is my Manifest :
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.algerlasmart"
android:versionCode="1"
android:versionName="1.0" >
<permission android:name="com.exemple.algerlasmart.permission.MAPS_RECEIVE"
android:protectionLevel="signature">
</permission>
<uses-permission android:name="android.permission.ACESS_NETWOK_STATE"/>
<uses-permission
android:name="com.exemple.algerlasmart.permission.MAPS_RECEIVE"/>
<uses-permission android:name="android.permission.READ_LOGS"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission
android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<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_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-sdk
android:minSdkVersion="12"
android:targetSdkVersion="27" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"
/>
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme"
android:name="android.support.multidex.MultiDexApplication"
>
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyBBu2eJ-fSdlwUI9dPJhlbxK0emspboplQ"/>
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version"/>
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:configChanges="orientation|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainInterface"
android:label="#string/dashboard"
android:configChanges="orientation|screenSize">
</activity>
<activity
android:name=".GetContact"
android:label="#string/dashboard"
android:configChanges="orientation|screenSize">
</activity>
<activity
android:name="com.exemple.fragments.Dummy"
android:label="#string/dashboard"
android:configChanges="orientation|screenSize">
<intent-filter >
<action android:name="com.exemple.fragments.Dummy"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
</application>
</manifest>
The Google play services library i've used is lib for API 22 (not worked) and i downgrade to lib r18 (old from google's repĂ´sitories).
the XML file of my map is the following:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/arroundMeLay"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView
android:id="#+id/libele"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Large Text"
android:textAppearance="?android:attr/textAppearanceLarge" />
<fragment
style="#style/mapViewStyle"
android:layout_width="match_parent"
android:layout_height="200dp"
class="com.google.android.gms.maps.MapFragment" >
</fragment>
</LinearLayout>
Please i've spend over a month stucking at these problems .
NOTE : i've tried every time to update ,upgrade , downgrade SDK but still no answer or solution worked for me .

Related

Unity Android App is not compatible with debugger device after publishing it on Play Store

I created an augmented reallity app using Unity and ARCore Foundation library, I used my Samsung A23 smartphone in order to test and debug it; after everything was working as expected, I published it on play store and after deployment was approved, I found out it is not compatible with my phone. Am I missing something?
https://play.google.com/store/apps/details?id=com.Anarvista.anARVistAPP&hl=es
Google Play Store requires the app to set Target API Level to 31 which matches with my cellphone, minimun API Level is set to 28 (Android 9.0 Pie)
This is manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="com.google.ar.core.depth" />
<uses-feature android:glEsVersion="0x00030000" />
<application android:icon="#drawable/app_icon" android:label="#string/app_name">
<activity android:name="jp.fantom1x.plugin.android.fantomPlugin.FullPluginOnUnityPlayerActivity"
android:label="#string/app_name"
android:exported="true"
android:screenOrientation="sensorPortrait"
android:launchMode="singleTask"
android:theme="#android:style/Theme.DeviceDefault.Light.NoActionBar.Fullscreen"
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Unity Build Settings
I am expecting this app being available and compatible with my Samsung A23 cellphone since I used it for debugging this app before publishing it.

Google Maps doesn't load map's images

I implemented an example of android app with google maps, but the map hasn't been correctly loaded. When I zoon in the map gets blur and doesn't load the streets or any other details.
The logcat continuously shows the following message:
11-25 00:17:09.657: D/REQUEST(1485): Connection opened to:https://clients4.google.com/glm/mmap/api
11-25 00:17:09.663: D/REQUEST(1485): Open Connection
11-25 00:17:09.932: D/REQUEST(1485): DRD(60): 62|147
11-25 00:17:09.948: D/REQUEST(1485): Close
11-25 00:17:09.950: D/REQUEST(1485): Error processing: com.google.maps.api.android.lib6.b.d#2c85fd8f not retrying
I'm running the app with the android emulator with the following characteristics:
Device=Nexus S(4.0", 480x800: hdpi)
Target=Google APIs (Google Inc.) - API Level 17
CPU/ABI: Google APIs ARM (armeabi-v7a)
I already checked my API KEY and it's ok with the Google Developers Console. The SHA-1 key on my debug.keystore is exatcly the as the one on Developers Console, as well as the app package.
I saw a question here in the StackOveflow (http://bit.ly/1xVvo5D) that suggest to remove the following line HttpsURLConnection.setDefaultSSLSocketFactory(sslContext.getSocketFactory());. However, as far as I know I'm not using such code. Just to double check, I searched for HttpsURLConnection with eclipse Ctrl+H and nothing was found.
The manifest is:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.myapp"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="17"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<!-- External storage for caching. -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!-- My Location -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<!-- Maps API needs OpenGL ES 2.0. -->
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<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="my-api-key" />
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:exported="true" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
The main activity is:
<?xml version="1.0" encoding="utf-8"?>
<fragment xmlns:android="http://schemas.android.com/apk/res/android" android:id="#+id/map" android:layout_width="match_parent" android:layout_height="match_parent" android:name="com.google.android.gms.maps.SupportMapFragment"/>

Run Only Google Maps Android API v2 3

I know this topics already have posted. But I am not success for this work.I can not run google map v2 in emulator. Now I am trying BlueStack. When I run BlueStack then it show Get Google Play Service. What I do please tell me.How I can run google map v2 successfully.
My AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.gmapdemon"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="9"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="MY_KEYandroid"/>
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version"
/>
<activity
android:name="com.example.gmapdemon.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>
</application>
</manifest>
Create an emulator from genymotion that supports google map api. You can look this up.
Find a download for the app store that will run on your emulator. I found mine here: http://wiki.rootzwiki.com/Google_Apps#Universal_Packages_2... I was using the 4.2.2 version.
Drag and drop that into your emulator. I am using google nexus.
Say ok to the prompts.
Once everything is installed close down the emulator and restart.
sign up with a good account.
VoilĂ 

Android Google Maps ClassNotFoundException

I'm creating my first Google Maps app, but I've run into some trouble and I can't figure out why. I'm getting a ClassNotFoundException. I'm new to Android in general, but this error has me stumped.
Here's my manifest.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="edu.purdue.cs.cs180.safewalk"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<uses-library android:name="com.google.android.maps" />
<activity
android:name=".RequestActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
And here's how my layout uses the MapView. I know that my API key is correct.
<com.google.android.maps.MapView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/mapview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:clickable="true"
android:apiKey="#string/mapskey" />
Finally, here's the error from the logcat.
12-03 13:11:25.861: E/AndroidRuntime(940): Caused by: java.lang.ClassNotFoundException: Didn't find class "edu.purdue.cs.cs180.safewalk.RequestActivity" on path: /system/framework/com.google.android.maps.jar:/data/app/edu.purdue.cs.cs180.safewalk-2.apk
Edit: Sorry, the manifest didn't copy over perfectly. Yes, the package has been set. And my virtual device is set with Target: Google APIs (Google Inc.) - API Level 17.
If you are trying to run it in the emulator, you need to define you AVD with Target set to Google APIs (Google Inc) - ... and not Android nn - ....
Regards.
Only close the project and reopen it. Fix it.
Orz

android: what settings are required to upgrade an app from android to 4.04?

My development phone (nexus s) just completed a OS upgrade to version 4.0.4 since which time my app has started to misbehave. It loads without error, some parts of the app are not appearing
I have tab host that contains a number of views, one of which is a map view. Some of these views contain view flippers with a list view and a linear layout. Now when I click on a list view, it won't show the map view.
Is there anything that needs to be set or installed to get an app that was developed for an earlier version working on 4.0.4?
The android project build target is set to Google APIs. I tried changing this to Android 4.0.3, but errors appear all over the place. Is a different version of the Google API required for using a map activity in android 4.0.4?
Here is a copy of my manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="dc.ase.dublincityparking"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="8" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:icon="#drawable/parking"
android:label="#string/app_name" >
<uses-library android:name="com.google.android.maps" />
<activity
android:label="#string/app_name"
android:configChanges="orientation"
android:name="dc.ase.dublincityparking.DublinCityParkingActivity" >
<intent-filter >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>

Categories

Resources