I made a project and I want to use the slideMenu library but when I import it the package.R class will be undefined because the attr.xml that found in library res/values. like import offers.findme.com.R;
Try this ...
Once you download the file from site you mentioned and extract it to a given destination, all you have to do (if you're using Eclipse) is
File-->import-->Android-->Existing Android into Workspace , and select that
library location.
And to use it in your projects go to
properties>Android and add the new library.
Hope this helps...
if you use eclipse then start a new project say projectLib from library source
and then configure the build path of the project to include the projectLib and rember to export i with the app
alternatively you could copy the source and resources of your library to your project and instead of offers.findme.com.R look up for your.project.R
You should refer your library project in your android project.
import library project into your workspace and into eclipse.
Right click on your android project. goto properties. Choose android. Click add browse the library project and add the same.
Now clean and build.
For more info check the link below. The link has snap shots if you scroll down
http://developer.android.com/tools/projects/projects-eclipse.html
First you need to import the library as an Android Project.
Then you need to set it as your project's library, by Right-Click your project directory > Properties
There you can mark the library project as your project's library.
After that, Project > Clean your project.
The README file says the steps clearly.
Regards.
There are a invalid line in style.xml that prevent me to access the new library the line was id property
Related
I want to use this library https://github.com/koush/ion in my project.But I don't understand how can I install it.I am using Windows 8 and Eclipse.How can I install ?
Download that project and put it in workspace of eclipse and import it from work space to eclipse and make it as library project and add it to your project.
Steps to import:
Right Click on package explorer
Import
Existing Project into Workspace
And then browse to the location where the project downloaded
Import it
Steps to add it as library to your project:
Right-click on your project -> Properties
In Android->Library section click Add
Select recently added project -> OK
That's it!
Now you can use it
You must perform the following steps:
Download ion project code.
Import it in your workspace using eclipse.
Right click in your current project and select Properties. The project properties windows must be opened.
Select Android option.
Go to the bottom of this tab and you can view the Library section.
Add the library dependency using the Add button.
I hope that helps!
You are probably better off downloading the jars vs the source.
https://github.com/koush/ion#get-ion
Download those two and place them in the "libs" directory of your project. If that directory does not exist, create it. From with your Eclipse project preferences, you can add those jars as dependencies.
Iam trying to reference a Android project library to my application. I do this:-
1)File->Import->General->Existing project into workspace->Select project library->check copy to workspace.
2)Right click on project->Properties->Android-> Add-> Select project library-> Apply-> ok.
But when I again check if the library is added I get the following:-
How do I resolve this?
Make sure that your library has the same location with your project source files.
It means that if your source is on your workspace , then your library should add into workspace. If not, you should copy your lib into same folder with source then mount it again.
Make sure the library project is checked as a library.
Go to the library projects BuildConfig -> Android -> Check "is library"
Make sure your project and the library project have the same target/min SDK versions.
It's also a good idea to clean your workspace and Build the library project - Right click on library project -> "Build Project"
Try this answer:
The project name needs match the folder name on the file system. What you are seeing in the Project Properties->Android->Library Reference is a relative file system path.
Reference:
In eclipse, unable to reference an android library project in another android project
Thanks to archie-bpgc for comment
i am also facing this problem i have solve this problem like
when import lib in to workspace tick mark as show in picture (basically library project and your project both are in same workspace)
now add lib to your project and clean project
you need to import the project to workspace and the library file into the same workspace.
Then you will not face this error. Kindly the root cause is not known. But this method works.
After all this .. one more way is you can alter the project properties last line where the library file path is specified.
Thank you.
I want to use game api in my android project.
And I get started by following the instructions described in Google Site
(the part - Setting up your game project) from the following link.
https://developers.google.com/games/services/android/init
I have downloaded the library BaseGameUtils from this link
https://github.com/playgameservices/android-samples
Then I import it as a project as described in instruction.
However, what I've got is a project named main but not BaseGameUtils.
And then I cannot called its BaseGameActivity in my android project.
How can I solve it?
Same issue solved differently.
I've imported the BaseGameUtils project and also couldn't refer to it.
If you right-click the BaseGameUtils project that you've just imported and then go to properties > android and check "is library" you are able to refer to it in your app project.
Solved.
When importing project, not to select BaseGameUtils folder, but the root folder 'android-samples-master'. Then check the project named BaseGameUtils.
This worked for me:
Download code from github, https://github.com/playgameservices/android-basic-samples
In the downloaded folder copy the files from
android-basic-samples-master\BasicSamples\libraries\BaseGameUtils\src\main\java
to
android-basic-samples-master\BasicSamples\libraries\BaseGameUtils\src\main\src
Now import android-basic-samples-master as an android project.
Choose only BaseGameUtils , you'll get a project called main, right click project > properties > android
Add library and select google-play-services_lib and also tick isLibrary and OK.
Also add an external jar android-support-v4.jar by right clicking project > properties > Java Build Path > Add external Jar .
Now add this project named main to your actual project as a library. TADA !
SOLVED.
You must follow: From the command line run Scripts/make_eclipse_compat (or Scripts/make_eclipse_compat.cmd on Windows). This creates the directory structure needed to import the projects correctly.
Attention: android-basic-samples-master > Script/make_eclipse_compat.cmd
Ref: https://github.com/playgameservices/android-basic-samples
Adding to SEG.Veenstra's answer "....just imported and then go to properties > android and check "is library" you are able to refer to it in your app project" this link as there are problems in Google's documentation: Android Play Services Leaderboard cannot be installed (BaseGameUtils)
This is the original Directory structure from this playgameservices github link
android-basic-samples->BasicSamples->libraries->BaseGameUtils->
Change your BaseGameUtils project directory structure to this:
Now try importing this BaseGameUtils project into your Eclipse workspace.
Right Click on BaseGameUtils project->properties->Android->Check Is Library
Right Click on "YourProject"->properties->Android->Add->BaseGameUtils
Apply & OK.
Now BaseGameUtils is linked with your project
Sorry for the long title, here's the jist:
I have a android application project which I'm hosting on bitbucket.
There is a library on github I'd like to add as a dependency.
I'm unsure of
How to add the github project as a library to my Eclipse project?
How this will work when pushing/pulling from Bitbucket?
Thanks, David.
Setting your dependency as a library: you'll have to clone the project to a local folder, import it as a project into Eclipse, and in your project configuration you'll have to set the library project as a library: do a right-click in the project's name, go to Properties and under "Android" click in the checkbox "Is library".
Adding the library to the main project: In your main project, go to project properties the same way, and under "Android" click in the "Add" button and add a reference to your library problem.
More details here: http://developer.android.com/tools/projects/projects-eclipse.html
git: if you don't want to put the library's source code into your project you can add it to a .gitignore file and download it manually everytime you clone your project from Bitbucket. You can also take a look at git submodules: http://git-scm.com/book/en/Git-Tools-Submodules . Sorry but I never used them to give you more details.
If the library is a .jar file, you can simply paste it into the libs folder of your app. Android should automatically add it to the build path. As far as pushing/pulling from BitBucket goes, as long as you add the .jar file in git the library will be committed like any other file.
Can anybody tell How to add java project as library in android project using eclipse?
As is explained in the documentation, you can go into project properties (e.g., Project > Properties from the Eclipse main menu), go into the Android section of the properties dialog, and use the Add... button in the Library group box to pick an Android library project from the available libraries in your workspace.
Maybe take a look here..
Import source java project in Android project
Or you can create a jar file from your project and import it as external jar as described here
hope it helps
For Library Project:
Rightclick->Properties->Android-> tick Is Library
For project in need of import:
Rightclick->Properties->Android->Add...->Library Project