Android - Warning after update google play service - android

After update my google play service version to last released version, when enable minify in debug or release the following warning shown and task not complete.
Warning:io.nlopez.smartlocation.activity.ActivityStore: can't find referenced method 'DetectedActivity(int,int,int)' in program class com.google.android.gms.location.DetectedActivity
Updated version : compile 'com.google.android.gms:play-services:10.2.0'
I add this line in my gradle apply plugin: 'com.google.gms.google-services'
Can anyone help me ?

I found the issue i use this Library in my project and Google play services version 10.2.0 is incompatible with this library

Try to add Google Play Service location package:
compile 'com.google.android.gms:play-services-location:10.2.0'
Also you should check SmartLocation library description, last compatible version of Google Play Services 10.0.1:
https://github.com/mrmans0n/smart-location-lib
...
Google Play Services compatible version: 10.0.1
So, I think, you should downgrade Grade Google Play service to v. 10.0.1, is you use SmartLocation library

Related

Latest google play services Ads Library conflicting Issues 17.1.2

When I update Gradle google play services Ads Dependency to the latest version 17.1.2
**implementation 'com.google.android.gms:play-services-ads:17.1.2**'
Conflicting issues found saying: All gms/firebase libraries must use the same version. Examples include implementation 'com.google.android.gms:play-services-ads:17.1.2 and implementation 'com.google.android.gms:play-measurement-base:16.0.5.
Note: I have not even used firebase anywhere in the app and I update the ads dependency from version 15.0.1.
Use
implementation 'com.google.android.gms:play-services-ads:16.0.1'
implementation 'com.google.android.gms:play-services-measurement-base:16.0.1'
Hope it helps.
you have to choice first update all google dependency with same version or second one is remain dependency with old version.

Android Google Map : Error in android google map

I used google map in android version new 2.2 and I get same messages error in messages gradle build.
and event log
I don't know where is the problem. Can anyone help me?
Your project is exceeding 65536 methods. This is likely because you are importing the whole Google Play Services library doing
dependencies {
compile 'com.google.android.gms:play-services:9.6.1'
}
You can import only the modules that you are going to use. If you are only using Google Maps you can change your Play Services dependency to be
dependencies {
compile 'com.google.android.gms:play-services-maps:9.6.1'
}

Google play services maps 9.2.0 issue

My Android app has been successfully using maps by including the following in my gradle ...
compile project(':googleplayservices_lib')
My SDK manager says I have rev 32 which appears to be the latest. So with this, everything has been working just fine.
Now I'm enhancing the app and I saw some posts that says I can now use zIndex parameter when adding a marker to control the Z Index. But to do this I must add the following to my gradle . . .
compile 'com.google.android.gms:play-services-maps:9.2.0'
So now my gradle file has this dependencies section . . .
dependencies {
compile project(':library')
compile project(':googleplayservices_lib')
compile files('libs/gson-2.2.4.jar')
compile 'com.android.support:appcompat-v7:22.0.0'
compile 'com.android.support:design:22.2.1'
compile 'com.google.android.gms:play-services-maps:9.2.0'
}
Now I'm able to set zIndex but this new version apparently comes with breaking changes. For instance the following no longer works . . .
map = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))
.getMap();
map is a GoogleMap. The compiler cannot resolve the getMap() method. My problem is that I can't seem to locate the documentation on this new maps revision where it discusses breaking changes for this new version. Does anyone know where I can find such information?
My Android app has been successfully using maps by including the following in my gradle
Presumably, that is an in-project copy of the old Eclipse library project edition of the Play Services SDK. Ideally, you would have moved off of that to the Play Services SDK artifacts back when you moved to Android Studio.
My SDK manager says I have rev 32 which appears to be the latest
Since you are using a local in-project copy, what the SDK Manager reports is not directly relevant.
Also, Google has not been maintaining that library project for at least the past several months, so "latest" of that library is meaningless with respect to using the latest version of the Play Services SDK.
So now my gradle file has this dependencies section . . .
I am surprised that compiles. Remove compile project(':googleplayservices_lib'). If you are using parts of the Play Services SDK beyond Maps V2, use appropriate and compatible artifacts for those APIs as well.
The compiler cannot resolve the getMap() method.
getMap() was deprecated about 20 months ago, in favor of getMapAsync().
My problem is that I can't seem to locate the documentation on this new maps revision where it discusses breaking changes for this new version.
Maps V2 release notes are in the Play Services documentation. A subset of Maps V2 release notes are incorporated in the overall Play Services release notes.

Google Play Services Library and API 18 (AppOpsManager not found)

I use Google Play Services and selectively compile in Gradle for Admob and Analytics like this:
dependencies {
compile 'com.google.android.gms:play-services-ads:+'
compile 'com.google.android.gms:play-services-analytics:+'
...
}
It doesn't work on API 18 device. It crashed with error log:
Could not find class 'android.app.AppOpsManager', referenced from method com.google.android.gms.common.GooglePlayServicesUtil.zza
I then upgraded my device to API 19, and it worked. So I guess the latest Google Play Service Library 7.8.0, is referencing AppOpsManager, but according to documentation of AppOpsManager (link), it's only available since API 19.
Any hints to get it to work with lower API level devices?
(I have to use selective compile for Google Play Service to avoid "dex-index-overflow", and I'm using Dexguard which doesn't work with multi-dex enabled apk.)
Admob and Analytics works from API 9
Try with this:
compile 'com.google.android.gms:play-services-ads:7.8.0'

Execution failed for task ':packageAllDebugClassesForMultiDex'

I am try to use the new android multidex support for a project. I have some problem with this exception:
Error:Execution failed for task ':shineV3:packageAllDebugClassesForMultiDex'.
java.util.zip.ZipException: duplicate entry: com/google/android/gms/analytics/internal/Command$1.class
about the problem. I use 2 different jar package as dependency, and some class will be duplicated in classes.dex because both jars contains they. any idea?
thanks in Advance
For those that are coming into this, I figured out why this was happening. For me it was that I was compiling the Google Analytics V2 jar as well as the full play services. Google allows you to break down what play services you really need for you app and compile those individual items. Check them out here. I excluded the Google Play Analytics which is on V4 right now and it worked
If you are integrating Google Analytics V2 and Google play services in your app, then you need to do the following in your gradle file:
dependencies {
compile 'com.google.android.gms:play-services:4.0.30'
compile files('libs/libGoogleAnalyticsServices.jar')
}
It worked for me. Hope it will work for others too. :)
adding this to your grdale compile "com.google.android.gms:play-services:7.5.+" means adding all play services including analytics, maps, vcm .. etc. you can add
as guides mentions:
In versions of Google Play services prior to 6.5, you had to compile
the entire package of APIs into your app. In some cases, doing so made
it more difficult to keep the number of methods in your app (including
framework APIs, library methods, and your own code) under the 65,536
limit.
From version 6.5, you can instead selectively compile Google Play
service APIs into your app. For example, to include only the Google
Fit and Android Wear APIs, replace the following line in your
build.gradle file:
compile 'com.google.android.gms:play-services:7.5.0' with these lines:
compile 'com.google.android.gms:play-services-fitness:7.5.0' compile
'com.google.android.gms:play-services-wearable:7.5.0'
https://developers.google.com/android/guides/setup

Categories

Resources