I created one android application I followed all the steps to make API keys and intalled google play services from Android SDK Manager. I read so many blogs for integartion google map, I Import the libraty project to my worksapce from "\adt-bundle-windows-x86\sdk\extras\google\google_play_services\libproject\google-play-services_lib" path. when I tried to add library project from project's property window in android tab I got following out put
But when I check this library second time than I got following out put in android tab
I have proble of libraty project. I used eclipse IDE. I got some solution but for different IDE , so suggest me for best solution..
The first problem usually happens when the path to the library is too long, the solution would be to move the google-play-services lib to a place where it path would be shorter and then try to reference it again.
your second problem:
"Google Maps Android API(23127): Failed to load map. Could not contact Google servers."
caused usually when there is a problem with your API key or a problem with the permissions you have defined in the manifest file, take a look a this post I wrote and go over all the steps to generate the key:
Google Map API key
Next, check steps 5-7 and verify you defined the right permissions:
Google Map API V2
Sometimes it may happen, you should remove and add the same library again
or restart the eclipse and add the library
Related
I have a working Android app using:
Google Maps (play-services-maps)
Google Location, Activity Recognition, and Places (play-services-location)
Google Analytics (play-services-analytics)
Google Mobile Ads (play-services-ads)
I'm currently using version 8.3.0, everything works fine. I'd like to upgrade to the last version, 9.2.0. When I change the number in the gradle files, Android Studio is unable to find the APIs packages & classes (saying "package XXX does not exist" and "Cannot find symbol class YYY").
I currently have no google-services.json file, do I need it now? I tried without success, probably because I have several modules / submodules, and I don't know where the json file is needed or not.
The problem is that I need a package name to create the JSON file, and I have some library modules, without package name, using Google APIs.
If needed, here is the project structure:
Maybe you did something wrong while upgrading your project. Make sure you follow the correct steps in upgrading. I suggest you to retry the process of upgrading, but make sure you do the correct way. Like in configuring your build and setting up Google play service.
For your question about google-services.json, Google-services.json contains developer credentials and configuration settings, which is needed to verify while connecting with GoogleApiClient. Though your service is working fine without it. But it will only work with your test device, as it is detecting your developer account. And after you releae your app in public, it will not work without the json file. So you need it and don't delete.
sources: What does google-services.json really do?
So, I finally got it: I was using the AutocompletePrediction.getDescription() method, which has simply been removed (and replaced by AutocompletePrediction.getDescription .getFullText()). That call made gradle stops building -_- .
Thanks Google for removing stuff without deprecating it for a while (though the docs says that the method is deprecated: https://developers.google.com/places/android-api/releases)...
I can also confirm that in my case, the google-service.json file is NOT required.
I am trying to get the basic Google Maps example to work
https://developers.google.com/maps/documentation/android-api/start
Unfortunately, whenever I run it on the emulator using Geny, the screen is blank. After some searching, I am seeing others say that I should verify that both the app/src/debug/google_maps_api.xml and app/src/release/google_maps_api.xml have the key I created.
I have verified that app/src/main/res/values/google_maps_pi.xml has the key, but the other directories for debug and release do not exist.
I have synced my project with gradle files and still not seeing them.
Any ideas would be appreciated.
If you are adding Google maps to an existing project, using this tutorial as a basis,
https://developers.google.com/maps/documentation/android-api/start
then you must first create a new project using the maps activity wizard in Android Studio. Copy and paste the various differences mentioned in the tutorial such as the manifest.xml, build.gradle, and google_maps_api.xml.
The one thing I did not realize I needed to do was copy the directories app/src/debug and app/src/release from the new project to my existing one.
Once that is done then you can confirm that app/src/res/values/google_maps_pi.xml and app/src/res/release/google_maps_api.xml are using the same API you created.
I am building an Android app that I want to open google maps with the click of a button. I want the app to find the current location of the user and give them directions to a predefined address. I started building the application before I realized there were special steps that you have to take to include this functionality. To add this feature to my project I followed the directions on these two sites:
https://developer.android.com/google/play-services/setup.html
https://developer.android.com/tools/projects/projects-eclipse.html#ReferencingLibraryProject
The problem is on the second site, when i added the library to my already existing project it caused all of my code that has findViewById(R.id.whatever) or setContentView(R.layout.whatever) to become errors. It is now telling me that i need to import the class R. If I do that it then gives me error messages on the names of all my xml files.
For example in my MainActivity it is telling me that i should change setContentView(R.layout.activity_main) to setContentView(R.layout.activity_list_item) and does this for all references to my xml files for the entire project.
I tried going back and removing the google play services library from the project and starting over but when I removed it the errors still persists. I also tried using the "fix project setup" option in Eclipse but it didn't fix the problem.
I'm wondering if anyone here has experienced this problem before? If so, how can I fix it? The application had no errors before I tried to include the google play services library. I am new to Android development so a lot of the information I have found has been either confusing to understand or doesn't seem to include enough details for me to figure it out. Thanks for your help!
Look at your imports, and check if you are importing the correct R.java from your application package, not from the android package.
Check also if your XMLs don't contain errors, otherwise R.java won't be generated.
In my case android-maps-library had to errors in two files (I have forgotten their names), I edited the two files removing errors my self. And finally I was able to used it quite nice.
i think you have correct yout Project build target, and this how:
right click on your project folder in the package explorer->propreties->Android
then porject build target and choose you Android target (Android x.xx)
but before that you need to remove import android.R;
I've this popular problem developing an android application with Eclipse:
error: Error: No resource found that matches the given name (at 'value' with value '#integer/
google_play_services_version').
So I've tried to import the google play library as specified here but I've this error:
Invalid project description.
C:\Users\Max\workspaceAndroid\google-play-services_lib overlaps the location of another project: 'google-play-services_lib'
Infact if I try to manage the libraries of the project I get this:
It seems that the google play libraries are already imported and I can't add new library.
The last chance I think I've is to add manually the string
compile 'com.google.android.gms:play-services:4.4.2#aar'
to my build.grade as specified in this answer but I don't know where find the file or if this will solve my problem.
How can I fix the error? Thanks!
Have you had the Google Play services installed already via the Google SDK Manager?
It looks like the following for me:
Here's what i did in the whole setup, to use the Google Maps Android V2 api
Google Maps API setup, Android V2 API
I had the same issue and was able to solve it by
Importing the google play services as an android project in eclipse
Adding reference to this imported project as a 'Lib' in
README.txt under google-play-services-lib reads like this;
Library Project including Google Play services client jar.
This can be used by an Android project to use the API's provided
by Google Play services.
There is technically no source, but the src folder is necessary to ensure that the build system works. >The content is actually located in the libs/ directory.
USAGE:
Make sure you import this Android library project into your IDE and set this project as a dependency.
Note that if you use proguard, you will want to include the options from proguard.txt in your configuration.
I was trying to run a google map application, but when I include google-play-services-lib first, it shows like this
but after that when I recheck it shows
because of this my application is crashing could anyone possibly tell me what could be the scenario?
Try to put your Google Play Services library and your project folder in same drive and then import library from that drive after that clean your project.
Hope it will work for you.
Try to put your project and google play library in same folder. Remove that red color error library from android properties and add it again with new drive. May be it will work.