I have had an old application project that uses ActionBarSherlock. I have found it, and made a few changes to it. Now, I need to add new activities to the project, but when I try to do so, eclipse give me a lot of errors. The reason behind the errors is - I think - that the ActionBarSherlock and appcompat_v7 is interfering with each other as they are using the same resources. So my question is: Is there any way I can add new activities to my project without importing the new support library? (if I add them manually or copy them, they won't be in Manifest.xml)
Thanks in advance.
So my question is: Is there any way I can add new activities to my project without importing the new support library?
Sure. Just don't use the new-activity wizard. Create the Java class the way you would any other Java class. Create the resources the way you would any other resources. Add the <activity> element to the manifest manually. And you're set.
Related
Firstly thanks to Mark Murphy, regarding comment 10 and the link to a really blank activity template in Android Issue 67513
Now the question regarding the new template: Is it intended that it should still create a new appcompat_v7_n+1 library project?
When I tried it, one was created. I deleted it, removed the reference from the blank activity project, then had to delete references to appcompat styles in the values folders and a style in the manifest.
Don't get me wrong, doing that was no big deal and it's a vast improvement but I'm wondering if that was intended.
Is it intended that it should still create a new appcompat_v7_n+1 library project?
Crap.
The new-project wizard adds some of that. I thought it was all in the new-activity wizard, which also adds some of that when using the stock templates.
I'll need to fork the NewAndroidApplication template to get rid of those bits. I'll work on that. I've added a note to the project README in the interim.
Thanks for pointing this out!
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
I want to ask, if is there some way how to change support-library-v7-appcompat to actionbarsherlock lib in existing project. I've tried it many times and ways and I still get the same error - it removes all R.java folders and shows: Jar mismatch - fix your dependencies! I've already tried to put actionbarsherlock lib to new project and it works well. It only doesnt work, when I want to switch from another support-lib.
Do you have any idea, how to solve this problem?
Thank you very much
By the way:
I am doing it because it seems that appcompat doesnt support SearchView for API 7 but sherlock does - from what I read. Second think is, that my application project which has to be supported by sherlock is copy of another one. - I dont know, if it is important for this question.
So I've solved it this way:
I've created new project and added support library ActionBarSherlock
A copied all of previous project to current - using Sherlock
I put the same package to second project
And of course I had to change some things in classes (Fragment to SherlockFragment etc.)
I have developed a Project. it is working fine. so i want to use this project as a library for some other project. so i have created this project as a library. Later i have created new Application and added this library project to my new Application Project. then i run the app .
suddenly the previous screen in the activity stack is finishing automatically. i am not getting why this is Happening. Any one have the idea about this issue , Please suggest me
Even though it is added as a library project.
You still need to add the activities that you are calling/using(from the library project) in your new projects AndroidManifest.xml
Though I must say, you should consider showing your logcat and calling code.
Have you set reference to your project?
Rightclick on your project-properties-android-islibrary mark it and add
android:noHistory="true".
beacause of this attribute. stack history was removed. by removing this attribute it working fine
I am new to android and i want to know if it is possible to have multiple android projects in a single worksapce. I am using eclipse.
Just create or import new project in the left panel - Package explorer....)))))
For a new project: File, then New, then Android Application Project.
To import an existing project: File, then Import..., then Existing Projects into Workspace.
Yes it is possibly, and in fact the usual way to do it ;P
It is entirely possible. Add as many projects as you want. I would suggest using working sets to group them as well by right clicking on a project and selecting assign working sets.