I have already created an phonegap android project and it is working fine, now i would like to create same kind of project againg. Might it would be more than 5 apps, so i thought making it as library.
I have make the project as library and created a new project with different package name. Change the launcher activities name to the libraries launcher activity name. But now the issue is application error is happening, cannot load the index.html file.
So i think the way worked on is not the proper one, can anyone please help me to solve this problem.
you have to assign your initial android project as a library. right click the project, pick properties, then go to android, tick the "is library" box and apply
For your new projects, you need to "add" the project before as your library as the image above
Related
I have two independently developed Android projects (with own activities etc.), tested and working independently.
One project is now supposed to be launching (via Intent) the second project.
I could have kept it that way, but when distributing it via the Android Market, it will necessitate 2 APKs, 2 icons, etc. which could be very confusing to the end user.
So I would like to integrate the second project into the first one, while keeping it as a separate package.
A straightforward approach for doing this is to manually create an empty package, then copy over all files, one by one, from the second project. Tedious.
Is there a built-in shortcut in Eclipse (or ADT) to do this, similar to the File > Import > Existing Projects into Workspace ?
I think you can make your second project as a Library Project by right clicking on it and in the Android tab check isLibrary. And then in your first project, you link the one that you made a library by right clicking again and under the Android tab, Libraries, click Add and point to your Library Project. You could also have a look at Managing Projects from Eclipse.
If this does not work (but I really should), you can simply just right click on your packages, then select Copy and go to your first project, and just right click -> Paste. This also worked for me.
Experts,
I am having the source code of 2 android apps which have been separately developed. I need to combine both of them as a single application so the output would be a single apk file. Let me more specific.
App 1: Shop list app -
App 2 Calculator app.
using a button click in the App 1 I would want to call the second app Calculator. I have researched on Internet and I am seeing some suggestions like library project etc.
Anyone who has some idea on the feasiblity, please throw some ideas on the same.
Thanks,
Harry
output would be a single apk file.
Then use as a library project.
Check this may help you
Setting up a Library Project
Referencing a library project
Open Eclipse-> right click on your project-> Build Path -> Configure Build Path
Go to "Projects" tabs on Top and add new project which will install two apks of the curernt project and the depends project that you just added.
It will do the trick for you.
Thanks
I'm trying to add the facebook SDK to my project but it won't work at all.
I've followed the official steps; opened the fb sdk, made sure it's set to "is library", in m yown project go to properties->android->add library and it lets me select com_facebook_android and it shows up with a green tick next to it. HOWEVER, when i go back to that screen straight away it now has a red cross next to it, and if i try to launch the app in the emulator it has " com_facebook_android] Could not find com_facebook_android.apk!"
(This is just me testing without referencing the library in my app)
if i DO reference the library, then any calls to the facebook library give an error within eclipse and the tooltip suggests to add it to build path, so if i click that it launches fine, but still does the above apk error and the app force closes on any activity which references facebook.
As far as I can tell I'm following the official instructions fine but it just keeps coming back to that red cross in my app's properties
Does anyone know what this could be?
Not sure why you have the issue, i've setup a empty project with facebook library in it, if you have no luck then try downloading that, unzipping it and importing exsiting project into workspace.
link : Download here
you know what i have done one trick to use the official facebook SDK in my application, i have created com.facebook.android and add all the library classes into it. Then i can easily reach to access any class whenever i want it. This can be a way to use the classes inside your application instead of using Library.
Its running fine in my case.
I am just starting off with android and have been googling high and low to find any tutorials/resources that could answer my beginners questions.
How can import a third party resource into my project and start using it?
For example, i wanted to use scrollableTabActivity, a widget that's available at https://github.com/honcheng/ScrollableTabHost-for-Android. I have downloaded and it looks like it is a project by itself. How can import into into my project and start using it?
This is the case of even projects like droid fu, for the life of me i could not figure out how to add them and start using in my project.
I did successfully added asynchttp into my project cause there was .jar download available. But for projects like droid-fu or scrollableTabActivity, how can i use the source files to add the functionality into my project?
Any help is highly appreciated
Thanks
Add the projectyou downloaded to you workspace.
Right click on it, properties, Android and be sure the Is Library checkbox is checked.
Then in your project, right click, properties, Android and click on add on the bottom right to add the previous project.
The project you refer to actually contains a lot of demonstration code which shows you how to use the ScrollTabHost control in your app. Rather than trying to include this stuff which will just bloat your app, simply copy the ScrollTabHost.java file in to your project, along with any resources upon which it depends.
I agree with Mark Allison's answer. But generally speaking to import a whole project in Eclipse, check the box next to that third party project name on the Project References tab in your project Properties.
I am trying to add the LVL library project to my application's project. It should be simple and straightforward, but it isn't:
When I click the Add... button, I receive the Library Project Selection dialog as expected:
I select it and it is being accepted with the green checkmark next to it.
However, when I re-open that Properties > Android box again, it gets a red X next to it, making it unusable:
There is an excellent answer documenting the "delicate behavior" of referencing a library project, but despite implementing the tips there (same root directory), I am still having this problem.
How do I solve (or workaround) this problem?
Is there a way to make Eclipse/ADT use fewer..\..s to represent the path of the referenced library project? (all is needed to reference that library correctly is ..\..\thisisinsane\library, there really is no need for all that ..\..\..\..\..\..)
I solved the problem by following the excellent steps in this answer.
In essence, The Eclipse+ADT duo doesn't "like" projects that aren't in the workspace, regardless whether these are application projects or library projects (even if Google created them).