Android Device 4.4.4 Google Play Services - android

I am developing an Android app and want to support back to API version 15.
The device I'm running has Android version 4.4.4
Google Play service is install on the device with version 4.4.52
What dependency do I need to add to my gradle? I've tried a bunch but haven't had luck:
Example:
1)
compile 'com.google.android.gms:play-services-location:6.+'
This compiles however it fails on run saying play services needs an update.
2)
compile 'com.google.android.gms:play-services-location:4.4.52'
This doesn't compile and I get the following error that I'm unsure how to fix.
google play services 4.4.52 attribute "theme" has already been defined
Here is a list of my entire Gradle dependencies:
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'org.parceler:parceler:0.2.13'
compile 'com.jpardogo.materialtabstrip:library:1.1.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.google.android.gms:play-services-location:6.+'

You should use: com.google.android.gms:play-services-location:7.5.0.
To get the following info: Google Location, Activity Recognition, and Places.
GooglePlay Service is compatible to Android device that runs Android 2.3 or higher and includes Google Play Store.
All info about GooglePlay Service SDK, you can look at: https://developers.google.com/android/guides/setup

Related

Does Google Firebase work on Android version 4.4.2(kitkat)?

I am building an app using the firebase database I have used in gradle:
compile 'com.google.firebase:firebase-auth:10.0.1'
compile 'com.google.firebase:firebase-database:10.0.1'
But my app works well in android lollipop, marshmallow and nougat very well but doesn't work at all in android kitkat. Whenever I run app, it doesn't crash but it is not able to read or write data from firebase. Please help me in this case.
Yes, it does
read the prerequisites in the following link
https://firebase.google.com/docs/android/setup
I had the same problem, I managed to solve it after couple of hours,
The problem was with the play services,
Android Studio Was giving a warning that
Google Play services out of date. Requires 10298000 but found 9256032
In short your phone has low version of play services installed than what it is needed.
To solve this you can use a lower version of play services in your gradle file.
compile 'com.google.firebase:firebase-database:9.0.2'
compile 'com.google.firebase:firebase-auth:9.0.2'
compile 'com.google.firebase:firebase-core:9.0.2'
compile 'com.google.firebase:firebase-crash:9.0.2'
compile 'com.google.firebase:firebase-storage:9.0.2'
or you can also update the google play services from play store

Cordova Application in Emulator throws "HelloMap won't run unless you update Google Play Services" although GPS are installed

I installed fallowing things with Android Studio SDK Manager:
Intel x86 Google API System Image [API level 23]
Google API
I create Virtual Device with Target Android 6.0 (Google APIs)
Problem:
If I run sample HelloMap app, app alerts me:
Why? If I look to Settings -> Apps -> Google Play Services, it's enabled (v9.0.80)
Maybe gradle.build will be helpful:
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
// SUB-PROJECT DEPENDENCIES START
debugCompile project(path: "CordovaLib", configuration: "debug")
releaseCompile project(path: "CordovaLib", configuration: "release")
compile "com.google.android.gms:play-services-maps:+"
compile "com.google.android.gms:play-services-location:+"
// SUB-PROJECT DEPENDENCIES END
}
EDIT:
from adb logcat i get this:
GooglePlayServicesUtil: Google Play services out of date. Requires 9256000 but found 9080470
now is clear, that i have lower version of Google Play Services, than System image requires. Problem is that GPS are up to date according to SDK manager in Android Studio.
Relevant thread
I'm not trying to run the sample HelloMap app, but I did encounter this error after building one of my apps using an updated Android SDK.
I changed plugins/cordova-plugin-googlemaps/plugin.xml to:
46 <framework src="com.google.android.gms:play-services-maps:9.0.2" />
47 <framework src="com.google.android.gms:play-services-location:9.0.2" />
After that I removed and re added the android platform it started working on the emulator.
I found some info at:
Firebase Auth not working - 'Update Google Play services' msg on the emulator (Android)
and http://notnull.co/2016/06/16/android-issues-this-app-wont-run-unless-you-update-google-play-services/
Exactly, seems to be a bug when you upgrade your google services but the android emulator doesn't reflect the change.
So, you should go back, 9.0.2 it's fine.

Android GCM-App won't run unless you update Google Play Services

I am using GCM Push Notification Code in my Android Project. While running on real Devices, every times it ask me to Update Google Play Services.
I am using the following version for GCM library:
dependencies {
compile 'com.google.android.gms:play-services-gcm:8.3.0'
compile 'com.android.support:support-v4:19.1.0'
}
I am using the same code from Android quickStart Sample:
Sample Code Link
I am targeting my App for 5.0 and above Devices. Is there any way, so that I can switch to lowest library version of GCM that majority of Android 5.0 comes with.
So that I need to install updated version of Google Play Services while running my App.
Always compile your project with the latest version which support libraries. They run on all version previous versions of Android.
All Android 2.3, 4.x, 5.x, 6.x version run the same latest version of the latest support libraries.
Current latest version of support libraries are
dependencies {
compile 'com.google.android.gms:play-services-gcm:8.4.0'
compile 'com.android.support:support-v4:23.1.1'
}
The whole point of providing Play Services and Support libraries is that Google can update following libraries on all phones without updating the core Android OS.
If you get message on your phone that you need to update Play Services then please do so. Without having the latest version of Play Services many apps will have problems to run.

Android Google Play Service on Emulator - Not working

I tried to use the Google Play Service to display location address and write code according to the official guide (https://developer.android.com/training/location/display-address.html), but it doesn't work on the emulator. So I downloaded and tried the example code on Github (https://github.com/googlesamples/android-play-location/tree/master/LocationAddress), and still found it not working.
I use the emulator: Jelly Bean Google APIs (Google Inc.).armeabi-v7a
Following some solutions on Stackoverflow, I downloaded the Google APIs SDK and Google Play Service SDK with SDK manager, but not working.
Here's the dependency code:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.google.android.gms:play-services:7.0.0'
}
To develop an app using the Google Play services APIs, you need to set up your project with the Google Play services SDK.
If you haven't installed the Google Play services SDK yet, go get it now by following the guide to Adding SDK Packages.
To test your app when using the Google Play services SDK, you must use either:
A compatible Android device that runs Android 2.3 or higher and includes Google Play Store.
The Android emulator with an AVD that runs the Google APIs platform based on Android 4.2.2 or higher.

Android google map not visible on emulator due to google service update issue

I am creating a google map application and I want to view my output on an emulator and I am developing using android studio version (beta)0.8.6. I have updated my sdk and installed all the necessary packages including google play services, google play repository and google apis for jelly beans 4.4.2 api level 17. But then again it shows :" This app wont run unless you update google play services".
this is my build .gradle:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:20.+'
compile 'com.google.android.gms:play-services:5.2.08'
}
and it shows me this message in logcat:
Assertion failed: for not generated items old indentation must be defined: element PsiElement(new line)
Please help me I am stuck on it for days.
I also had a lot of trouble with that.
Look in your device or emulator and see which version of Google Play Services you are using. I had version 5.0.89 on all my devices.
If you don't have Google Play Services, install the google apps (gapps) on your emulator or use a real device.
try changing this line
compile 'com.google.android.gms:play-services:5.2.08'
to
compile 'com.google.android.gms:play-services:5.0.89'
That helped for me.
(for some reason my build.gradle changed 5.0.89 to 5.2.08 again and it still works...)
related question with possible answers: play services update required
Here is another example where it worked: After update - crash com.google.android.gms:play-services:5.2.8

Categories

Resources