I am writing a MAP APP using Android Google Maps V2
But i am facing dependency problem, please see below images:
as you can see in above screen shot i am getting RedAlert Sign over Project Name
and as you can see in above screen shot getting RedCross over Android Dependencies
#ChulbulPandey
In Eclipse open Project -> Properties. Select Android on left. Check on the bottom that you have a reference to Google play services with a green checkmark. If not, click Add and add the google play services library
Path of google-play-services_lib at SDK;
\extras\google\google_play_services\libproject\google-play-services_lib
I am not sure but you can try this.
In Libraries tab remove the Google Maps V2 jar and add it again.
First, try changing project build target to something higher and then clean then build your project.
If that doesn't solve your issue then removing your external jar files linked and then import it again.
You must import google-play-services_lib library project from SDK and add a dependency to it from your project.
Path of google-play-services_lib at SDK;
\extras\google\google_play_services\libproject\google-play-services_lib
See link
Related
Hi I know this question asked a lot but none of them help me to fix my problem.
I simply want to import this Project to my android Studio but I give this error message
Error:(15, 39) error: package com.google.android.maps does not exist
and this is my SDK:
I try clean , rebuild , invalidate cache but none of them help me.
osmdroid contributor here.
osmdroid-android, which is the primary map engine does not require google play services.
osmdroid-thirdparty does need since it provides a wrapper for using gmaps with osmdroid apis
if you're building for source: osmdroid can be built with maven (which currently has issue with play services) and gradle. suggest you use gradle with android studio
otherwise use this
dependencies {
compile 'org.osmdroid:osmdroid-thirdparty:5.0.1#aar'
}
I dont think osmdroid does need googlemaps library. But anyway, have you tried adding google-play-services library to build.gradle?
If you havent you can do this by following steps
Click on Project Structure
Go to Dependencies Tab
Click + button
Select com.google.android.gms:play-services and click ok
Rebuild the project
I am using GCM in my project for push notifiaction, but when I added google play service library into my project after importing this, A red exclamation mark appeared in my project, I already have seen different question and answers regarding this problem when I saw my build path of project there is cross sign on Android dependencies folder please help me,
You are supposed to import the whole google play project and use it as a library project for your own project, not just the jar. Try Google's guide again.
Check to see if your google play lib looks like this:
That means the jar is not available in bin directory...check manually that the jar is available or not in that directory..
I'm working on an android project which requires the use of google maps. I've been reading tutorials, and I have to add this to the AndroidManifest.xml file:
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
The thing is, I don't know what number to substitute the "#integer/google_play_services_version" with.
If anyone knows what I should enter there, and how to obtain that integer value, I'd appreciate it.
There is no need to subsitute. The value #integer/google_play_services_version takes care of it. Just make sure you have the latest Google Play Services library which is updated.
You can find it under google-play-services_lib>res>values>version.xml if you wish to add the number rather than #integer/google_play_services_version.
<?xml version="1.0" encoding="utf-8"?>
<resources>
<integer name="google_play_services_version">4030500</integer>
</resources>
Here is the official guide for setting up Google Play Services in your project.
FYI, you could find the version number in this folder:
~\android-studio\sdk\extras\google\m2repository\com\google\android\gms\play-services
Enjoy.
Error you have mentioned is maybe because of not adding Google play services lib as library of your project do the following.
Select File -> Import -> Android -> Existing Android Code Into Workspace and click Next.
Select Browse, enter
/extras/google/google_play_services/libproject/google-play-services_lib, and click Open.
3.Select Copy projects into workspace and click Finish.
Mark Google Play services as a library: Right-click the google-play-services_lib project, and choose Properties > Android. Tick the Is Library option.
Right click on your project -> go to properties -> click android -> click add button -> click google_play_services_lib -> ok -> apply -> ok clean your project
this will remove your error
If you are using gradle just make sure you have the updated google play services version (downloaded using SDK manager) and put this in your project module dependency section:
compile 'com.google.android.gms:play-services:+'
IMPORTANT NOTE: In general it is not a good practice to remove the concrete version of the source you are compiling against.
I was in a case where I had to use the Froyo version of the Google Play Services, and that version doesn't require the tag. In fact, the XML entry google_play_services_version does not exist in the Froyo+ version of the Google Play Services library
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.
My app crashes when I try to use libraries (like Google Analytics or others).
I've searched on Google and found some help but it still doesn't work...
My lib folder is called "libs", I've got jar in the build path...
Have you got any ideas?
The error is :
java.lang.NoClassDefFoundError: com.google.analytics.tracking.android.EasyTracker
EDIT :
Here my conf :
Thanks.
If you're using Eclipse, try this
Select your Project with the Mouse
Right click->Properties
Select Android
Verify that you've selected the "Google APIs" version that you need for your project
At the bottom, your Libraries should also appear. If they don't
Click the Add button. Add the missing libraries. Careful, though, your libraries need to use compatible APIs to your main project.