After importing next problem, does not see the library as I understand.Tell me how to solve the problem
Again, I imported the project, now Screen is not quite empty but not full
aaa Sorry decided I did not put the settings
How did you do the import? I'm not too sure I understand your project structure. Do you have an available JAR file of the library you need? If you do, create a /libs folder in your Android app. Build the project and the import should be available.
If you are importing a library project, right click on your main project, choose Properties then Android then under Libraries, add the library project you need.
Related
I'm having a lot of trouble figuring out how to build a jar of the Showcase View library so that I can import it into my application.
I've searched all around but can't find a process for it. I tried importing into Eclipse but I can't get it in there since it isn't a project and I'm not sure what type of project to create from source with.
Any help would be greatly appreciated.
Easiest way is:
Create an empty Android Application project in your Eclipse workspace.
Copy files in ShowcaseView/library/ folder of github to your new project base folder.
Refresh project in Eclipse.
Goto project properties - Android and select "Is Library"
Clean unnecessary stuff and build.
It should be ready to add as dependency of your app.
Alternatively you can pick another library project .project file and copy it inside this library folder, edit it to match your new project name, etc... And then import in Eclipse. But this is more hardcore if you don't know what you're doing.
I imported the library into eclipse by going to File>Import>Existing android Code> etc
and now i have an extra project called "library" in my workspace
Then I right clicked on the project i want to implement this library to and clicked properties, added the library project, as shown in the screenshot below. But when I click Apply/Ok i get a jar dependency error, does anyone know how I can properly use the slidingmenu library in my app? Thanks
Jar mismatches are usually due to the support v4 library jar file being in both your project and the library. To fix this, make sure the entire project and its libraries has 1 copy of the jar by deleting any others. Afterwards, reference that one copy by right clicking your project and adding that copy as an external archive.
I'm creating a new app and I want to use some libraries like this: https://github.com/JakeWharton/Android-ViewPagerIndicator
I had downloaded this library, added it to my workspace using New Android Project -> Create from existig source. Went to properties > android, and checked Is Library. Then I went to properties > android in my app project, and clicked add on the Libraries section, and chose the library, and It show me the library with a green V near it. I've clicked ok, but couldn't use the library so I've opened the properties > android again, and there was a red cross near the library, and '?' under the "Project" column.
I can't understand why it's happening! It's really annoying, happened to me when I tried to add facebook API to my app, and I just gave up and copied the source to my project.
Thanks
You have to copy every Library manually inside Eclipse Workspace, before importing it, as Eclipse seems to be silly if the Library lays somewhere else. Also symlinking a Library will not work.
The solution for me was to Delete the library project from Eclipse (but not from disk of course), and Import it again (Import existing Android Code into Eclipse). The problem disappeared then.
I'm trying to get ActionBarSherlock and the ViewPagerIndicator libraries set up for my projects, but I seem to be running into a few issues. I sent Jake Wharton (The developer) a few messages earlier about it, and got a few replies but couldn't get anywhere - and I think he got busy with a few other things.
What my issue is, For both VPI and ABS
Both libraries open up without any errors, and I'm using compiler version 1.6 for all as is required.
The funny thing is, if I load in the samples that are provided - they work fine and link to his library; but when I go to add the library to my project - the above happens.
Where to store the actual library project does not matter, as long as you use a relative link to reference it. Check out the Library Projects - Development considerations:
Library project storage location
There are no specific requirements on where you should store a library project, relative to a dependent application project, as long as the application project can reference the library project by a relative link. What is important is that the main project can reference the library project through a relative link.
You should always use the Eclipse ADT plugin to select and set up Library Project Reference, i.e. right-click project -> Properties -> Android -> Add, then in the opened Project Selection window, select the Library Project list here (of cause you should import them in the same Eclipse workspace as your Main Project). This will add a android.library.reference using relative path into project.properties as well as show relative path in the Android preference window:
android.library.reference.2=../../../../../Documents and Settings/yorkw/Desktop/JakeWharton-Android-ViewPagerIndicator-f09acb0/library
If you directly alter it using absolute path from project.properties as below:
android.library.reference.1=C:\\Documents and Settings\\yorkw\\Desktop\\JakeWharton-Android-ViewPagerIndicator-f09acb0\\library
Then after Eclipse refresh your project, you get the exact error described in your question, see my screenshot below:
Hope this helps.
While importing the libraries, make sure that you tick the "Copy projects int workspace" check box. The library projects need to be in the same workspace for them to work.
delete and import the project and lib again. build the lib project , add lib to project, still error shows.. rename the lib project. this worked for me ....
I am going to licensing my Application. I know all the process for licensing application.
But for that I have to load the Library Project in My Workspace.
I have loaded the Library Project in my WorkSpace then i have imported it into my Original project. It works great.
But now the problem is, If i have once deleted that library project and then if i have imported into workspace from another location and if i import it in to my that project then it is not going to import it.
And if i Import it from the previour one location, then its again works fine. . .
So why it is happening like that?
Why i am not able to import the library project from any location?
Please guide me for this.
Thanks.
I dont know why it is happend. But if you have import once from any location. and then delete it.
Now if you are imported the same project from another location than it is also not going to imported.
For sollution you have to Put that library project at once place for which you what it every time.
And if necessary then do not delete that library project after Importing it to the Original Project.
Thanks.
If you want to include a project to your current project follow the steps,
1.) Right Click(or Alt+Enter) on the project_as_library->Library-> check mark Is Library
2.) Right Click(or Alt+Enter) on the project where you want to include the Library, go to Android->Library->Add. When you click Add you will see the Project name that you declared as Library, selected that and Press Ok and you are done.
From your question, i am assuming that you want to import any library into your project and if you want to use any library(.jar) then you can do these steps:
create "libs" folder inside your application's structure, at same level of "src" directory.
Now copy those libraries into this libs folder.
Right click on any librarary -> Build Path -> Add to Build Path.
Update:
As you have commented below as its library project, i would suggest you to go through this Android doc on Setting up a Library Project