Google-Play-Services Lib Project - Gone Today After SDK Update [duplicate] - android

I updated the Google Play Services version from the revision 29 to 30 using the Android SDK Manager, but after updating the directory "<sdk>/extras/google/google_play_services/libproject" disappeared, leaving only the directories "docs" and " samples".
I've tried uninstall and reinstall several times but always happens to miss the directory "libproject".
Anyone had this problem with the update?
I'm using Debian Linux 8.4 (jessie) although not believe it has anything to do with the problem.

Looks like Google just broke down Google Play Services into multiple libraries. You'll find them in <sdk>/extras/google/m2repository/com/google/android/gms, if you also updated Google Repository through the SDK Manager.
The individual libraries are in aar format, so you'll have to extract the jar yourself, if that's what you're after.

I am working on a legacy project in Eclipse and I fixed the problem a slightly different way than the others. For me using the project from Google Play Services revision 29, had all sorts of dependency problems which I could not resolve. For example it wanted the compatibility library v4 so I imported it but even then it could not find some required resources.
However, I was able to use Revision 28 without such issues and set the minimum version of my app to be ICS. Below is a link to version 28. Download it, unzip it and extract the libproject folder to where it would normally have been prior to removal.
Import the project in Eclipse (ensure copy files is selected) the usual way and all will be fine.
https://dl-ssl.google.com/android/repository/google_play_services_8298000_r28.zip

For now I downgraded back to revision 29 (and worked well) using the version history available on this site: http://www.smorgasbork.com/2015/01/05/google-play-services-sdk-version-history
I believe it is possible that this is the new format that Google will provide the libs (in .aar files) up because of the description of the update:
The revision number 29 says "client library and sample code" and the revision number 30 says "javadocs and and sample code".

The m2repository folder contains aar files used for android studio. If you look at the samples folder and open some of the sample apps project.properties file you will see that the sample apps still reference the google-play-services_lib. This is for sure to be fixed by google, I saw also people complaining about display ads problem, so maybe they will come back with an update quite soon.

I posted a question about this in the Google Mobile Ads SDK Developers forum. Summarizing the steps in the answer (from Veer Busani, Mobile Ads SDK Team):
We would never recommend you to rename/edit any part of the Android SDK. If you find any issues, do let us know and we would look into it. As to your Mobile Ads/Unity/Android integration, I will certainly help you. Please follow these steps if you are on Google Play Service revision 30.0 (v 9.0) -
Make a new project and import the Mobile Ads Unity package.
Copy our demo script, make a new empty GameObject and add the script as the component.
Right click on Assets > PlayServicesResolver folder and select Google Play Services > Resolve Client Jars.
There is a known issue with GMS revision 30 in Unity. To build for Android, you would need to select Assets > Plugins > Android > firebase-common-9.0.0.aar file and in the Unity Inspector, deselect Android under the Platform for Plugins sections.
Finally, edit the Bundle Identifier in your Player Settings and deploy your awesome project to your Android device.
This worked.

Related

Unable to build project with both Firebase and Mapbox

I have created a location-based game using the Mapbox SDK in Unity 2018.2.1f1, and it has been able to build just fine. My goal was to add database functionality to my project by using Firebase, to store GPS coordinates online.
I followed the official tutorial for setting up Firebase in a Unity project. When this was completed, a window popped up saying "Resolving Android Dependencies", which took about half an hour.
Since then, I have been unable to build to my Android device. I receive 96 gradle build error, and the one at the top is:
> No toolchains found in the NDK toolchains folder for ABI with prefix:
mips64el-linux-android"
I reverted the project to its pre-Firebase version, and it was still unable to build, as if something in the Android build tools had been changed.
Next, I tried an entirely different version of Unity, and installed a fresh install of Unity 2019.2.9f1. I opted to use this version of Unity's in-build Android SDK and NDK. I reverted my project back to the last known working version (pre-Firebase), ported it to the new version of Unity, and completed a successful build to my device before moving on.
Then I followed the appropriate steps to add Firebase to my project again, and the same exact pop-up windows appeared in Unity, claiming that it detected "obsolete files" that it wished to delete (this time I said no), and then it performed the same "Resolving Android Dependencies" process.
Once this process was complete, I made no other changes, and tried to build again. It failed, and I received the same 96 gradle build errors. This confirms this error as repeatable on two different versions of Unity.
I believe this has something to do with conflicting dependencies between Mapbox and Firebase. Has anyone encountered this issue, or successfully been able to use these two things together in a project?
So, the baseline problem is that something is telling the Android build process to generate project files for the MIPS architecture. This architecture was removed from the official NDK in r17 (see this link for supported architectures). I'm not sure if Unity ever supported it, but it's not in the current version:
I do not know how MapBox is packaged and shipped, so I don't exactly know what postprocessing hooks might be conflicting between that and Firebase. I'll try to give you some steps forward though.
First, make sure you have the latest SDK from Firebase and MapBox. Also, when it asks to delete obsolete files, say yes. The Play Services Resolver should only prompt this for files that it tracks (and the Firebase plugin ships in a state where this is expected).
If that doesn't help, look for a mips folder included in your Unity project (probably something like libs/mips or jnilibs/mips). Hopefully deleting these will fix the issue.
If the above doesn't work or is non-actionable, try using a mainTemplate.gradle file:
If you follow the instructions I wrote up here to instruct the Play Services Resolver to patch your mainTemplate.gradle file:
You can double check your ABI filters directly in the file. By default it shows:
ndk {
abiFilters **ABIFILTERS**
}
to match what you've selected in Unity. But you can use this to double check that mips64 isn't included via some other process.
Unfortunately I don't know what else to suggest if neither of the above options work. In that case I'd suggest posting a bit more of the error you're getting. If you can reproduce the error you're having with one of the Firebase sample projects, you can file an issue on that issue tracker directly. Finally, if you don't get an answer here and you do think that it's Firebase related, you can contact the Firebase support as well.
I hope something in my post helps!
--Patrick

Google Play Services revision 30 missing version.xml

I'm busy working on a legacy android application on eclipse and I need the latest version of google play services. In particular, I require the value of
#Integer/google_play_services_version. In previous versions this would be stored in
<android-sdk>/extras/google/google_play_services/libproject/google-play-services_lib/res/values/version.xml
however google have chosen to break down this latest version into multiple libraries and I can no longer find version.xml anywhere. If necessary I am willing to hardcode the version number, while not the ideal solution, but I obviously can't find this either. Any tips?
EDIT: I should note that I've successfully installed the latest m2repositry and integrated within my application play-services-ads from the aar inside there.
You can find res/values/values.xml (which contains the google_play_services_version) inside the play-services-basement aar.
Maybe the problem is in using Eclipse. Are you aware that Eclicpse is no longer officially supported for Android Development. Using Eclipse may be preventing you to quickly creating apps and finding the necessary resources to build a project.
To migrate to the Android Studio from Eclipse just follow this tutorial from Google developers.
For your problem about Google Play Service rev 30, I think this threads can help you with that.
Missing “/extras/google/google_play_services/libproject” folder after update to revision 30
There is no libproject inside google play services( Rev. 30) in eclipse Juno

Missing "<sdk>/extras/google/google_play_services/libproject" folder after update to revision 30

I updated the Google Play Services version from the revision 29 to 30 using the Android SDK Manager, but after updating the directory "<sdk>/extras/google/google_play_services/libproject" disappeared, leaving only the directories "docs" and " samples".
I've tried uninstall and reinstall several times but always happens to miss the directory "libproject".
Anyone had this problem with the update?
I'm using Debian Linux 8.4 (jessie) although not believe it has anything to do with the problem.
Looks like Google just broke down Google Play Services into multiple libraries. You'll find them in <sdk>/extras/google/m2repository/com/google/android/gms, if you also updated Google Repository through the SDK Manager.
The individual libraries are in aar format, so you'll have to extract the jar yourself, if that's what you're after.
I am working on a legacy project in Eclipse and I fixed the problem a slightly different way than the others. For me using the project from Google Play Services revision 29, had all sorts of dependency problems which I could not resolve. For example it wanted the compatibility library v4 so I imported it but even then it could not find some required resources.
However, I was able to use Revision 28 without such issues and set the minimum version of my app to be ICS. Below is a link to version 28. Download it, unzip it and extract the libproject folder to where it would normally have been prior to removal.
Import the project in Eclipse (ensure copy files is selected) the usual way and all will be fine.
https://dl-ssl.google.com/android/repository/google_play_services_8298000_r28.zip
For now I downgraded back to revision 29 (and worked well) using the version history available on this site: http://www.smorgasbork.com/2015/01/05/google-play-services-sdk-version-history
I believe it is possible that this is the new format that Google will provide the libs (in .aar files) up because of the description of the update:
The revision number 29 says "client library and sample code" and the revision number 30 says "javadocs and and sample code".
The m2repository folder contains aar files used for android studio. If you look at the samples folder and open some of the sample apps project.properties file you will see that the sample apps still reference the google-play-services_lib. This is for sure to be fixed by google, I saw also people complaining about display ads problem, so maybe they will come back with an update quite soon.
I posted a question about this in the Google Mobile Ads SDK Developers forum. Summarizing the steps in the answer (from Veer Busani, Mobile Ads SDK Team):
We would never recommend you to rename/edit any part of the Android SDK. If you find any issues, do let us know and we would look into it. As to your Mobile Ads/Unity/Android integration, I will certainly help you. Please follow these steps if you are on Google Play Service revision 30.0 (v 9.0) -
Make a new project and import the Mobile Ads Unity package.
Copy our demo script, make a new empty GameObject and add the script as the component.
Right click on Assets > PlayServicesResolver folder and select Google Play Services > Resolve Client Jars.
There is a known issue with GMS revision 30 in Unity. To build for Android, you would need to select Assets > Plugins > Android > firebase-common-9.0.0.aar file and in the Unity Inspector, deselect Android under the Platform for Plugins sections.
Finally, edit the Bundle Identifier in your Player Settings and deploy your awesome project to your Android device.
This worked.

What Version of Eclipse do I use for Android?

I am sure this has been asked before, but I can not find a good answer. I want to create an Android app, I want to use Eclipse, but there are so many versions on the downloads page, and I am not sure which one I should use ... some of these include
>Eclipse IDE for Java EE Developers
>Eclipse Classic 4.2.2
>Eclipse IDE for Java Developers
>Eclipse IDE for C/C++ Developers
>Eclipse for Mobile Developers
Thank You :)
I would recommend the ADT Bundle, as it has a suitable version of Eclipse, plus the necessary Android plumbing, in one download.
The answer depends on what you want to use in Eclipse. If you are just starting in the Eclipse world go for the smallest (lightweight) packages because they will also make your Eclipse experience smoother (loading, UI, etc.). From your list above I would choose Classic, but, if you ONLY want to focus on Android development, you could try the Google prepackaged version of Eclipse (ADT, see below).
You can install either:
standalone Eclipse plus the ADT plugins or
the prepackaged version of Eclipse with ADT provided by Google (recommended)
If you already have an Eclipse installed (which you probably want if you already use Eclipse and want to keep the existing worspaces/preferences/etc.) you can only install the ADT plugins from here. And both Indigo and Juno versions of Eclipse should work. Of course that you should try and upgrade your workspace first to Juno and than install the ADT plugins to avoid any other surprises.
The Google prepackaged version of Eclipse is here and will give you less headaches because you have almost everything into it. You only have to use the prepackaged download manager inside Eclipse to download platform versions and device images (and many other tools and examples). This will use Eclipse Juno version.
I would recommend the classic version, but in my opinion intelliJ is better
http://www.jetbrains.com/idea/
Google has just announced at Google I/O a new IDE called "Android Studio" which
is based on IntelliJ and can be found here:
http://developer.android.com/sdk/installing/studio.html
Any will do, but the most recommended one is Mobile. Also check the new IDE that Google released just for that (Android Studio).
Download Eclipse Installer from https://www.eclipse.org/ (top right
corner)
After downloading start installer.
Check if there is an option as "for Android Developers". If there is
not, click the updates button on top right corner. It downloads
updates for installer. After the download is completed check again
the list.
Download Eclipse for Android Developers.

Android SDK source code

I need to look at the .java files of the android sdk. I have developed applications before but I never needed to look at them so it wasn't a problem then. I saw there is a jar file android.jar that contains all the class files structured but actual sources are not there. git gives various problems to me because I am behind a weird proxy so http://source.android.com/source/using-eclipse.html hasn't been very helpful. What should I do?
EDIT: I'm talking about the java files, just to clarify. And in case you are okay with browsing the code online, Where can I find Android source code online? http://www.google.com/codesearch/p?hl=en#uX1GffpyOZk/core/java/android/
Just open the Android SDK Manager and select the Sources for Android SDK of the API level you are trying to support and click Install packages:
(In this case I selected those for SDK v4.3 API-18 and SDK v4.2.2 API-17 but I already have them installed)
If for some reason you SDK manager button doesn't show up on the Eclipse toolbar, follow this recommendations.
To link the source code to Eclipse just follow this instructions; Android Sources are usually under [ANDROID_SDK_FOLDER]/sdk/sources/android-[API_LEVEL]
You can download the ICS sources via the adk manager to your local machine and then attach them to your project in you IDE. See e.g. the blog of Lars Vogel
It is a online latest linux and android source code browsing website.
Android/Linux Source Code Cross Reference
http://hala01.com/
You can browse the .java files of the Android SDK here:
http://grepcode.com/project/repository.grepcode.com/java/ext/com.google.android/android
The links in the other 2 answers, http://hala01.com/ and http://grepcode.com/project/repository.grepcode.com/java/ext/com.google.android/android are no longer working.
You can download and view android SDK source code from this site. As of today in October 2021, source code of up to API level 31 is available.
Since such websites may become unavailable in the future, you may want to download local copies for safe keeping.

Categories

Resources