Run Google Play Services 5.0.89 on emulator - android

I'm trying to run an application using the latest Google Play Services (5.0.89 at the moment) on the android emulator, but every time I open it, I get the notification asking me to update G.P.S. I'm using a "Google API L18" AVD. And this is quite annoying if you're trying to run some espresso tests.
Apparently, it's a common problem that keeps plaguing android developers: https://code.google.com/p/android/issues/detail?id=57880
So far I've tried:
just clicking ok -> but then I'm not connected to the services, which is bad
switching to the Android L Preview AVD -> same problem
downloading the G.P.S. apk from somewhere and trying to install it. Fails, since it's already present (and cannot be uninstalled)
creating and AVD without G.P.S. and installing them manually. I get a "device not supported" error
installing just a few packages (like this "adb -e install com.google.android.gms.apk) -> but I cannot find them for the 5.0.89 version
in my application code, ignore the error returned by GooglePlayServicesUtil.isGooglePlayServicesAvailable -> the connection still fails (which means that simply not checking is not an option)
UPDATE Trying to edit the value of GooglePlayServicesUtil.GOOGLE_PLAY_SERVICES_VERSION_CODE through reflection -> didnt't work (btw, yes I know it's an horrible hack, at this point it was more curiosity than anything else)
So, did anyone find a solution for this?
So far, the only option I can come up with to make it work is to delete my local copy of G.P.S. from the SDK tools, replace it with a previous version downloaded from somewhere (I haven't looked for it yet, but I'm pretty sure I'll be able to find some shady site providing it) and then rebuild my app. But this isn't something I'd like to do.

If you go to the SDK Manager and check for updates, there should be an update for the API 19 system images. Have you tried updating to those and recreating the emulator and seeing if the problem persists?

Related

Xamarin.Forms - AOT compile not working (for Android)

This is the repository that demonstrates this issue.
This is simple standard project with one page. I created the archive for publishing (release mode).
If I use the "AOT compile" option, I get the error:
"Apk failed to install Error:could not parse error string"
If I disable this option, then the APK works.
To use my test project, update the option AndroidSigningKeyStore in ApkSignerIssue.Android.csproj to point to file test.keystore in the folder test.
I'm on Windows 10 and I'm using Android Api 26. If I try Api 25, it does not work. I've tried using VS 15.5.7 and 15.8.0(preview) with "AOT compile" and neither of those work.
Without this option, XF+Android can not be used; the first load of the app will take 8-10 seconds.
It worked earlier, but now I can not build a package to release an update to my application.
Downgrade to 15.5.7 working for me now.
I do not know why this did not work right away, maybe I rebooted the computer. but now it works.
That's good - I was able to release an update my app.
And this is very sad - this is my fourth Downgrade in three months(starting from 15.6).
Archiving the package does not work normally three months, three months, Karl!
I lost a lot of time.

Problems running app on actual device

OK, please take it easy on me, I am new to the whole Xamarin community. I have built a simple calculator app using MVVMCross. When I run the app in an emulator everything works great. It still needs some UI attention, but functionally it all works. When I go to archive it and make an install on my phone, it installs just fine. The issue is when I go to run it. As soon as it opens I get an error message. "Calculator.UI.Droid has stopped" Open app again. I have gone through everything I can find online to do this and nothing is working.
Here is my setup:
Visual Studio 2017 Community with latest updates
Windows 10 with latest updates
Latest Java SDK
Project Properties:
Compile using Android Version 7.1 (Nougat)
Minimum Android Version 5.0
Target Android Version 7.1
Use Fast Deployment - false
Generate one package (.apk) per selected ABI - unchecked
Enable ProGuard - checked
Linking - SDK and User Assemblies
Android Phone:
Google Pixel 2 with latest updates.
Any help would be appreciative. Just let me know if you need more information. Thanks in advance
I myself are also using Xamarin, and quite often I get this problem, most times it is related to the code, so please make sure that's the case.
comment out your calculator stuff, and try running the basic app on your physical device. if that works try to find the problem, idk if you can use breakpoints because your problems happens on boot.

Android Device Window Chooser not working after updating device

I've always used my android phone for development but after installing the last software update on my device (4.2.2) it suddenly stopped working and would appear offline in eclipse's Device Window Chooser.
I'm not able to send applications to it for testing or access it with the adb-shell. I have developer options turned on and debugging mode enabled. I'm using Eclipse Helios on Ubuntu linux.
When I launch Eclipse the following window will show up
and after clicking on the check for updates I get the following error:
Unable to read repository at jar:file:/home/matteo/Downloads/ADT-18.0.0.zip!/site.xml.
error in opening zip file</code>.
Last thing, if I open Window->Preferences and go on Android I see this:
This question is not a duplicate of Android device chooser - My device seems offline (of which I read every single line). It's a request for some rigorous solution from the community. In fact non of the proposed solutions helped me in getting my device to appear online, as you can see in the attached snapshot.
Please help me! Any suggestion will be very appreciated! ;D
Ok open sdk manager /sdk/tools/android now download the sdk for your new android version. In my case it was API 17. Once its done you should be ready.
If you still got some issue be sure that you have the last version of the ADT installed. Installing it again http://developer.android.com/sdk/installing/installing-adt.html
Now you should be ready to go.

Android SDK installation failed - Connection reset. Nothing is installed

Hello I have a problem with installing the packages using the Android SDK Manager.
I get Connection reset. Nothing is installed.
I am on Windows 7 64 bits using JDK 7.
Here is what I tried so far without success:
Installed Android SDK installer_r18-windows.exe
Then run Android SDK Manager as Administrator and I can select which packages I want to install.
So far so good.
Then when I select the packages I want and click Install then the log says:
Downloading SDK Platform Android 2.3.3, API 10, revision 2
peer not authenticated
I googled this error and they say that you need to set Force https://... sources to be fetched using http://....
If I do that and click install I get this error:
Downloading SDK Platform Android 2.3.3, API 10, revision 2
Connection reset
At every package it tries to install.
I tried setting the proxy setting according to my internet providers setting. I get the errors again.
I tried deactivating the firewall. Same errors.
So how do I get the Andoid SDK Manager to install the packages succesfully?.
Thank you for your help.
Others have also faced similar problems when downloadind SDK components.
A simple way to fix this problem is to modify the Pkg.SourceUrl property, changing HTTPS to HTTP to avoid secure downloads, as illustrated in the answer to this question.
I ran into the same problem today. In my case, the download would start and then abort with the same error message.
If the download starts and then aborts, try downloading again - SDK Manager will resume the download where it aborted. It doesn't advertise that feature (let alone resume by itself), but the log entries report that it is in fact resuming the download.
You might need to retry a few times - depending on how stable your Internet connection is and how much you download. Not too elegant, but will do for a quick on-the-fly install.
This may be cause of system time may have changed. Synchronize your system time with one of the internet time servers. Restart the installation. Hope it works.

Android SDK beginner question

I'm a n00b developer at my second attempt to use the Android SDK. I'm
developing on the Mac platform and I've noticed that the latest
version of the SDK doesn't include anything except the tools (so I
have no plugins, no targets to choose from inside the package I
downloaded).
So I tried to use the Android SDK and AVD Manager to download and
install some, however, I got this error:
Failed to fetch URL https://dl-ssl.google.com/android/repository/
I went to the settings and checked the box to force fetching via HTTP,
but no result. I was suggested to look for a configuration file, but
couldn't find any.
Any suggestions? I'm dying to get my hands dirty with the SDK.
Whenever I've seen that error, I've just retried the download several times and eventually it went through. I've only run into it when I was behind a proxy, but that might not be your problem.
Here you have a Android tutorial, step by step.
http://www.vogella.de/articles/Android/article.html
Its means that you are behind a proxy.Go tools->options in your android SDK manager and enter your http Proxy server and port and it'll work.

Categories

Resources