<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
I'm getting this error type:error:
Error: No resource found that matches the given name (at 'value' with value
'#integer/google_play_services_version').
I imported Google Map and services API into the project I'm also getting private GoogleMap map;(GoogleMap red error here)
My Project has Google APIs[Android 4.4] library but I'm still confusing :(
How can I overcome this issue?
You are referencing an resource in an xml file called integer, which is probably you didn't create, so whether you create this integer.xml and add a resource with the name google_play_services_version or you can replace the android:value="#integer/google_play_services_version" with android:value="version of you google play services as a number"
You could replace this meta-data section in you manifest file with this:
<meta-data
android:name="com.google.android.gms.version"
android:value="4030500" />
This problem is related to the Google play Service.
-- Please Note this answer is based on Eclipse IDE development environment --
+First: import Google_play_service_lip as into your workspace
I
Right click on your Package_Explorer
Import
Existing Android Code Into Workspace
Browse
Goto your Android SDK installation folder "Android-sdk"/ or whatever
/extras/google/google_play_services/libproject/google-play-services_lib
Click open
(I suggest you to check the box "Copy projects into workspace")
Finish
+Second: Now go to your project that you want to add Google Play Service to it (map in your case)
II
Right click
properties
on the left-Side Menu select Android
On the Right Side part go down to the Library section
Click Add
Select the library project "google-play-services_lib" // That you imported before.
+Now you can the the two lines to your Manifst files in your application section
<application
...// what ever activities you put here..
>
<meta-data android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
</application>
+One last point if you still have problems try Clean your project from the Project Menu
Project - Clean
Related
i have a question relate to Android project.properties. I have no idea how to use this file. I would like to ask what does the sentence mean?
android.library.reference.1=../google-play-services_lib
Inside my Manifest file. I have a sentence as below
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
But i can not find a file called "version" which contains resource like this
<resources>
<integer name="google_play_services_version">6587000</integer>
</resources>
everything works fine after i add
android.library.reference.1=../google-play-services_lib
inside project.properties.
could anyone explain what happens? All helps are acceptable.
You must be using Google Play Services API which are published by Google.
These APIs can be accessed via library. We need to link the google play library to our project. This is done via code:
android.library.reference.1=../google-play-services_lib
or via IDE Eclipse :
Right Click on Project -> Properties -> Android tab -> Add library
So now library is linked to your project.
The meta-data in AndroidManifest.xml :
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
is defined inside the library which is linked to your project. So, the integer google_play_services_version is defined inside the library
I hope this will solve your doubt
You are working with google play services library project in your project.
When you added android:value="#integer/google_play_services_version" in your manifest it is looking for respective resource which is already in google play service lib.
You can do same by using eclipse - project properties - android - add library.
android.library.reference.1=../google-play-services_lib
* which means your using google play service liberary in your project
* project.properties file is a location for
defining the android version which you using
to build the app and the liberary reference if any.
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
* This for mention the google play service version.there are different versions available
In Eclipse goto File ⇒ Import ⇒ Android ⇒ Existing Android Code Into Workspace
Click on Browse and select Google Play Services project from your android sdk folder. You can locate play services library project from
android-sdk-windows\extras\google\google_play_services\libproject\google-play-services_lib
Add the Google Play Services project as a library to your project. Right click on the project and select properties. In the properties window, on left side select Android. On the right, you can see a Add button under library section. Click it and select google play services library
I am trying to link google play services to my project that i had preveously developed a month ago.
So i followed the below steps:
I imported playservices library to workspace (i ticked the copy
option)
right clicked on project, android add library, i selected play
services and clicked apply and ok
What is happening
I am not able to link the services lib even after doing above steps
I get the error as No resource found that matches the given name (at
'value' with value '#integer/google_play_services_version').
When i check the proj-lib --- even after linking the playservices i can see libraries are not linked properly
How can i resolve this !!
I even cleaned workspace and restarted it .... updated playservices version ....still no effect
<application... >
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
...
</application>
add above to your application manifest.
Can someone give me a somewhat detailed step by step of how to import this library into an eclipse android project. I have imported many in the past, but they each seem to have different caveats to them and I can't figure this one out.
Here is the link to the main page of the library. I am trying to import lib-manipulation
http://nhaarman.github.io/ListViewAnimations/
currently when I import it there are errors in the project specifically in the manifest where it says
error: No resource identifier found for attribute 'allowBackup' in package android'
next to:
<application android:allowBackup="true">
<activity android:name="com.nhaarman.listviewanimations.itemmanipulation.swipedismiss.SwipeTouchListenerTestActivity" />
<activity android:name="com.nhaarman.listviewanimations.itemmanipulation.dragdrop.DynamicListViewTestActivity" />
</application>
It says on their page you need nineoldandroids but I already have that imported into my main project. When I import it (again the library shows errors at this point) I get the red exclamation point and sure enough there is a dependency issue which says the binary for the library cannot be found. I'd really like to use this library for my current project and those in the future. Please help! Thank you.
For Eclipse , Right click your project in the package explorer view (left side pane) and click on Properties and check Your Build Target (under Android Tab), is it pointing to the minimum SDK defined in the AndroidManifest.xml
I am using ADT 23.0.2.
I just imported the google-play library to my workspace and added the reference to it in my project.
Now nowhere in my project the resource ids can be recognized because there is no R file.
(Anywhere I have R.id.blah I get the error "R cannot be resolved to a variable);
It's just gone. What am I supposed to do?
I exactly followed the steps by developers.google.com. It's nothing complicated but I don't know why this happened.
(I have all layout files in place and no import for android.R are in my class files.)
Before adding the
Tools I use:
Here are screenshots from my app properties:
My manifest
<permission
android:name="com.appname.appname4.MAPS_RECEIVE"
android:protectionLevel="signature">
</permission>
<uses-permission android:name="com.appname.appname4.MAPS_RECEIVE"/>
<activity
android:name="com.appname.appname4.MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.appname.appname4.SearchResultListActivity"
android:label="#string/title_activity_search_result_list"
android:parentActivityName="com.appname.appname4.MainActivity" >
<!-- Parent activity meta-data to support 4.0 and lower -->
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.appname.appname4.MainActivity" />
</activity>
<activity
android:name="com.appname.appname4.ContactInfoActivity"
android:label="#string/title_activity_property_detail"
android:parentActivityName="com.appname.appname4.SearchResultListActivity"
>
</manifest>
I had similar issues when I first started Android programming. Here are some fixes that worked for me in the past.
1. Fix/Check all xml(layout) files.
Many times a R file not being generated is due to an issue with your layout file or Android Manifest file. Follow this link and work your way down the page checking permissions and the general layout format.
2. Project/Clean.
go to Project->Clean.
Also make sure you have selected the option to build project automatically.(Without this option check marked R file is never generated automatically).
3. Fix Project Properties.
Right click on your project in Package explorer then choose fix project properties.
Repeat Step 1 after this.
4. Builders.
Go to Project->Properties then Builders. Select the appropriate boxes.
Repeat Step 1, and Clean and rebuild project.
5. Appcom7 and Google Play services error.
Sometimes to fix errors associated with installing these two reference libraries. I copy there folders into a generic library folder on my hard(where I keep most of my eclipse reference libraries), after this I delete them from the Package explorer and from the "default" directory where they were installed. I Fix project properties again and clean/rebuild. This should get you back to your non-reference library version of the package. Then I manually add them as Projects to my eclipse IDE and finally follow this to add them as references to my project. Then fix project properties,clean and rebuild.
6. Reference Question.
Finally, referring to this StackOverflow page has helped me countless times. And one way or another fixed my issue.
Good Luck.
I've an android project which use google-play-services_lib for geolocalization.
I use Eclipse, I imported the library project into your workspace by clicking File > Import, Android > Existing Android Code into Workspace
Then I added the tag
<meta-data android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
as a child of application in my Manifest.xml.
After this, when i run my tests with robolectric, I'm facing with the problem:
com.google.inject.CreationException: Guice creation errors:
Error injecting constructor, java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value.
Expected 4242000 but found 0. You must have the following declaration within the
<application> element: <meta-data android:name="com.google.android.gms.version" android:value="#integer/google_play_services_version" />
Consider that I use Roboguice 2.0 and I've the follow order and export:
hamncrest-all-1.3
robolectric-2.2
JRE System Library
My_Project
JUnit 4
android.jar
maps.jar
mockito-all-1.9.5
How can I solve that?