I am converting my existing application to Android Instant App. I have successfully done that. My app is running in Instant App form. The issue that I am facing now is regarding Firebase-Analytics. When I run instant app I get this error
E/FirebaseInstanceId: Failed to resolve target intent service, skipping classname enforcement
E/FirebaseInstanceId: Error while delivering the message: ServiceIntent not found.
When i try to get FirebaseAnalytics instance using FirebaseAnalytics.getInstance(this); the instant app crashes. I am not able to get any sort of logs on Logcat. My "Installed" app is working perfectly fine. Also if someone can guide me on how to debug Instant Apps, I am not able to debug them or even get logs on Logcat.
Edit
Link to Bug Report
Google Play services for Instant Apps 2.7-release-179555567
With Reference to Google issue tracker
Your Google Play services for Instant Apps version is 1.22...
If you update to the latest, it should be fixed with: 2.7+
Uninstall Google Play services for Instant Apps
Go back to Settings > Google > Instant Apps
It will ask you to restore it > RESTORE
Now try running your instant app again.
If you are experiencing this while trying to build your instant app from Android Studio, you may have to repeat steps 1-4 one more time. On first provisioning, it may install your device with the incorrect version (1.22...), but afterwards, it should be the correct version.
That solved my problem but will users always have the latest Google Play services for Instant Apps (i.e. 2.7+)? As I didn't side load Google Play services for Instant Apps or was it installed by Android Studio?
Ans:-
Yes, users on pre-O should be periodically pushed the latest Google Play services for Instant Apps. Plus, they can always perform steps 1-3 to make sure they get the latest.
On O+, they shouldn't have to do anything either, since Instant Apps support is built directly into the framework from here on out.
Working with the OEMs, Google Play services for Instant Apps have been pushed to all devices which have been deemed compatible for Instant Apps. The other case is where Android Studio installs it when you try to build your instant app to a whitelisted device.
Related
We have an android app on Play Store for last 2 years. We are trying to connect the Google Drive API using play services inside the app.
Things are working fine for all the android OS except 4.4.X. In 4.4.X OS devices while trying to login to the Google Account most of the users are getting the error (as reported by them) like :
" is having trouble with Google Play services.Please try again."
Does anyone know how to fix this issue?. This is Not reproducing on all 4.4.X devices.
If you are having troubles with your virtual devices when running things like Google maps etc.; try creating a new virtual device with Google Play Store incorporated
On your Android phone, go to Settings.
Click on Apps.
Click Google Play services.
Click on Permissions.
Ensure all permission settings are turned on.
I've had the same issue as reported above after updating my app dependencies from com.google.android.gms:play-services-maps:15.0.1 to ..:16.1.0 (or ..:17.0.0). The problem for was that the installed version of Google Play Services on my device (a Zebra TC51 running Android 6.0.1 in this case) is rather old and is managed by our customer using a mobile device management solution (MDM) that is very conservative. Rolling back to ..:15.0.1 or updating Google Play Services to the latest version would both solve this issue for me. Sadly, I cannot force our customers to update Google Play Services (although I'd like them to update obviously).
Reproducing this is straightforward by just installing an older Google Play Services (download the July 2018 version for example, v12.8.74. Set your dependency to 16.0.1 or newer and you'll get the above error message.
I haven't been able to find an overview that lists the compatibility between versions of the installed Google Play Services APK and which versions of the com.google.android.gms:play-services-maps dependency are supported.
Also, have a look at the Overview of Google Play Services where it is explained how the included dependency (in your app) and the installed client library (on the device) depend on one another.
Make sure your Google Play Services is updated
For me worked: Settings > Apps and Notifications > Google Play Store > Permissions > All ON
I fixed this by following the instructions on setting up Firebase on a new project. I encountered the "Try again" prompt until I added firebase-core to the project.
Opening google maps once and the trying my map fixed the problem
I am new to running instant app. I have created a new "Hello World" project with instant app support, according to android developer documents.
But, when running "instantapp", the following error occurs:
I would appreciate it if anyone could help.
Note: There is a known issue running Instant Apps on the emulator image that includes the Google Play Store which will give this same error. For now, please use the emulator without Play Store.
Google Play Services giving statusCode=API_UNAVAILABLE means your device is not able to run Instant Apps for one reason or another. For example, you are not using a supported device or you are not in a launched country. Please see here for a list of supported development devices and here for a list of countries Instant Apps are available in.
The emulator should still work for development and will run outside of any restrictions. For instructions on setting up an emulator for Instant App development see here:
https://developer.android.com/topic/instant-apps/getting-started/setup.html#setup-emulator
Seen several S/O links which failed to fix this for me.
Have been developing an Anrdoid App with some use of Google Maps API.
Cannot test said code because it claims:
"Google Play services out of date. Requires 7895000 but found 6774470"
Instead of showing the map, you get a message plus an "Update" button, which crashes the APP if you click on it. (I believe it's dependent upon Google Play Store being installed)
There is no Google Play store installed on the emulator - this appears to be by design from Google, neither does there appear a way to install it.
The Google Play Services cannot be updated through the settings panel
I have tried downloading the appropriate APK and using adb install, but despite choosing the correct download (current version 6.7.74 1723905-470, downloaded apk 7.8.99 2134222-470) it says: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]
I have tried creating a new x86 emulator with a different Android version, same problems persist. Current preference is Google APIs v22 on x86.
How can you test Google Maps on an emulator without paying Google money?
So, I have an app which I am running on real device. When running the app the following dialog is shown.
Clicking Yes is followed by error in Console
- google-play-services_lib] Installation error! The package already exists.
- Launch failed on device:
I have tried uninstalling app from my phone but didn't work.
Any idea how to fix it?
You dont need to reinstall google-play-services. It's updating automatically by Play Market.
I had problems like yours and let me guess:
when you debuging app from eclipse - google play services doesnt sign in, but when u release it and download from play market - it works fine.
If its true, so mark your google-services as a library and delete from "java build path" in your app.
right click on project-> Properties -> Java Build Path -> Projects
Delete google-play-services from there
Now, you have to obtain debug certificate SHA1
in Eclipse go to Window->Preferences
Andoid->Build
(there you can find debug certificate SHA1 for debuging)
Go to Android Developper Console https://play.google.com/apps/publish
Select your game in Play service
Go to "linked applications"
Create a NEW linked application android and put it your debug certificate SHA1
Wait a few to changes be deployed
You will get two similar links, but with different SHA1 ( one for debugging, second for releasing)
Now, you need to clear the Android Application cache before trying to connect
Clear cache of your application
Launch your app
I solved my problem like this
That's caused by attempting to install an apk maybe from the ide with debug keystore on a device that has the production apk with the production keystore. Just go into the phones app settings and uninstall the app. I get a few of these after I test the upgrade path from the beta store and then go back to developing with the ide.
try doing it through command prompt use:
adb uninstall PACKAGE_NAME
and see if it works
also try renaming the package name just to be sure.
I feel you are trying to install google-play-services.You don't need to update google play services.From the docs:
The Google Play services APK
The Google Play services APK contains the individual Google services
and runs as a background service in the Android OS. You interact with
the background service through the client library and the service
carries out the actions on your behalf. An easy-to-use authorization
flow is also provided to gain access to the each Google service, which
provides consistency for both you and your users.
The Google Play services APK is delivered through the Google Play
Store, so updates to the services are not dependent on carrier or OEM
system image updates. In general, devices running Android 2.3
(Gingerbread) or later and have the Google Play Store app installed
receive updates within a few days. This allows you to use the newest
APIs in Google Play services and reach most of the devices in the
Android ecosystem (devices older than Android 2.3 or devices without
the Google Play Store app are not supporte
I have built the App local, I can install it directly on my android device without a problem.
It uploads to Google Play without a problem.
But when a user on any android device gets it from Google Play it won't install, it just gives "error: -24". Even on devices where the app hasn't been before (so no data bug).
https://play.google.com/store/apps/details?id=com.photoflirtapp
It's Certificate error.
You probably have another version of the App installed in your device. Remove that and retry.
Reference: http://forums.androidcentral.com/android-4-1-4-2-4-3-jelly-bean/292379-google-play-unkown-error-code-24-a.html