Can't create Android App without Compatibility library? - android

I'm trying to create a small Android App, without the compatibility library for fragments and stuff. Just a simple app. When I get to the "install dependencies" step in Eclipse, the next and Finish are greyed out. How do I continue? Are all new apps really required to have compatibility library?

Anyway you can delete the compatibility library later in Eclipse from your project's libs folder and remove it from Build Path.
Why to do that though?

Related

Cant run simple android program using Eclipse

I am studying Android now and I am really a newbie in this.
I am using Eclipse with Android. I already installed all the files under Android 5.0.1 (API 21) and also all the Tools. Then I try to create my simple "hello world example" but I got a lot of errors.
Here are my errors:
Can you help me with this?
It seems you have some problems with styles, anyway i suggest to use Android Studio if you start from the beginning.
Make sure you've added AppCompat on below picture:
That problem comes from AppCompat as you can see, seems like that library has a problem and you should follow this tutorial:
Following are the steps:
Paste the android-support-v7-appcompat.jar that you have downloaded
in libs folder of your project.
Right click on your project, select Build Path -> Configure build
path. Select Library Tab then Add Jar option and browse your
recently added v7 jar and click OK.
That should fix the problem.
Android actionbar how to add supporting library v7 appcompat for Eclipse
And i suggest you to use AndroidStudio.

Eclipse ADT: Project name "appcompat_v7" being created after creating every new project

Well I want to highlight this and bring it all in this thread, as the rest of threads did not have a concluded answer, so before skipping into them here are the threads I referred to:
Adt doesn't create default hello world but command line does
[solved ]Eclipse behaving differently while creating new project/activity
ADT has been behaving a bit weird since past few days. I keep my SDK always updated so I frequently Run the SDK manager and download all the updates. recently I noticed that if I create a new android app project it is not creating a default MainActivity even if I check that box, it does not create a Activity under src and more to annoy me, I wasnt able to refactor anything, so I realized that I had to update my Eclipse as after reading few posts, but now when I create every new project it creates an annoying appcompat_v7 project with EVERY project, say I create two new projects it creates appcompat_v7_2....this is driving me crazy and the new project library is the appcompat_v7 project. This is becoming annoying and no idea whats going on here !!!! What should I do...please rescue me ! Thanks in advance ....A screenshot to annoy u guys too ... :)
***************Current Alternative, not a solution***********************
As of 12/5/2014 with ADT 23.0.2 I dont see this issue anymore.
I have waited for an acceptable solution on this issue (as of now there is none), but one of the SO members directed me to this post https://code.google.com/p/android/issues/detail?id=66975. What I am doing is described in one of the solutions below, but for people who have come to this post, the alternative is to delete that ugly project(if you have more than one) which has been created and add up this one(appcompat_v7) as a library. So if you create another project and appcomat_v7_2...comes up delete that and point your project to the appcompat_v7, do the same for other projects too. This is not recommended for some reason though, but it worked well for me till now without issues. If anyone hits up with a solution please post it here.
****************Current Alternative, not a solution*****************************
the folder appcompat_v7 doesnt get created if i use
minSdkVersion="14"
Seems like it is a eclipse bug. What you need to do is go to properties in the of the Android Project and in the Android Section. Add the library appcompat_v7 and remove the appcompat_v_7_2 (duplicate). Then you can remove the appcompat_v7_2 as a eclipse project. All errors fixed.
Just a workaround.
The appcompat project is a library to support android's older versions. The support library was introduced by Google recently - I donĀ“t know in which Android version.
But the point is, this project is only created when you create an Android project to cross Android platforms. I mean, when you select an old min API, e.g. API 8 (Froyo), but target recently versions, your project must have the support library.
Anyway, the creation of appcompat_v7 project is some issue that has to be better configured by the eclipse plugin maintainers. However you can elegantly turn over this issue by targeting newer APIs and including in the build path the support library. This is more elegant than the others because it is better to you focus in only one android version when building your application, and when it is done, you have an authentic version of your app that you can use as a mold to support other versions, either older or newers.

Removing android-support-v7-appcompat

I was using the Android developer guide to learn. On my first run, I ran into a number of problems setting up the v7 appcompat library which caused more errors for the next steps ahead of the guide. I had to restart coding the guide.
However, I am not sure how to remove the support library (I want to start over), which is currently on the same directory of my app folder. I am using Eclipse IDE. Can I just delete it from the Package Explorer? Will that wipe the library clean? If not, how should I remove the library to re-learn?

If app only targets Android 4.0 and up, can v4 support library be removed from project?

I've written an app that only targets Android 4.0 (Ice Cream Sandwich) and up. android-support-v4.jar seems to be a dependency in my Eclipse project by default. Since I'm not targetting any lower than 4.0, can I remove this support library as a dependency, because it is not needed...? I don't want any unnecessary bloat being packaged with my application (correct me if that's not actually how it works).
If so, how does one remove it in Eclipse? I can't seem to find an option anywhere.
Sure. Just delete the jar, and if you don't have any other dependencies the whole libs/ folder.
uncheck create icon and uncheck create activity, when you create a new android application project. In this way, adt will not import support library, and the application template just finished.

Purpose and Disadvantages of an Android Library Project

At the moment I have two versions of my App: normal and plus
When I puplish a new relese I export it and then change the packet name and export it a second time. The plus version has some additional features which get unlocked by the package name..
I just discovered Android Library Projects (http://bit.ly/voHVWe) and now I wonder if that could be solution for optimizing the workflow decribed above?
A further question is, are there any more (dis-)advantages of using library projects?
- or would you propose another workflow?
Library projects can help you do exactly what you're looking to do. They're essentially like having an external assembly. All shared code would be in the library project, and each application (in your case, normal and plus) could utilize or inherit from the shared library code.
One gotcha for the library projects is that you need to make sure the application projects are using the latest version of the library project if you make any changes to it. I've been bitten before when I made a change to a lib project, and built the application to find out that it was using the old code (in eclipse just select the greyed out project, right-click and refresh).
This is the preferred way of developing apps with common resources and source code. There are some considerations to be made that are covered in the Managing Projects Developer Guide article.

Categories

Resources