Cant run simple android program using Eclipse - android

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.

Related

Unable to build android-support-v7

I've downloaded the Android SDK. I am trying to build the appcompat project. I've read that project is located here:
C:\Android\sdk\extras\android\support\v7\appcompat
I have imported the project into my workspace. It doesn't build.
I could go into great detail about which SDKs I have installed on my machine, etc. I could say that the values-v11, values-v14, and values-v21 folders all have errors, even though I have downloaded all three of these SDKs. But I am pretty sure if I import a project from the Android SDK website from the Android developer website, and I try to build that project, it should just work. I've followed the instructions here:
https://developer.android.com/tools/support-library/setup.html#libs-with-res
...and still not working.
So, why does this not work? I don't even care how to get it to work, I want to know why this does not work and why would I have to do any extra work or research to get it to build? Is this a problem with Eclipse? Should I be giving up on Eclipse and moving to Android Studio? This appears to be an incredibly simple thing to do and yet it does not work anymore.

Error with compiling Hello world Android App Build path

hi guys am going through the tutorial on building a hello world app from here
http://developer.android.com/training/basics/firstapp/running-app.html
I have tried everything that i could find on this forum.
adding the libraries
adding support libraries as a project using the following link
https://developer.android.com/tools/support-library/setup.html
nothing seems to do it for me.
I am trying to run the basic tutorial app and cant seem to complie
And I cant seem to upload a screenshot as well .. :(
first it is not code problem.
problem is in library had you using appcompact library if not than add it in this project and see.
or right click on project -> Android Tools and select Add Support library and check.

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?

Can't create Android App without Compatibility library?

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?

Library Projects support?

I have been trying to work with a Library Project, just like it's mentioned in the documentation :
http://developer.android.com/guide/developing/eclipse-adt.html
I have created my Library Project as a Android 1.6 Project and now I have been trying to reference to it out of my second project (also an Android 1.6 project) and I am getting the following error :
"Target 'Android 1.6' does not support building project with libraries."
"ERROR: Unknown option '--auto-add-overlay'"
The documentation states that supported platfroms are the 1.5 onwards (with exception for the 2.0 & 2.0.1) and that the second project should have the same platform or higher (in my case the same)...
So any idea what's ahppening here ? And most importantly : any idea how to solve this ?
Thx in advance !
How is the library project compiled as? is it a jar file? And in eclipse, did you add it in Eclipse as "Project Name" -> Right click -> Configure build path -> Libraries. Click on Add External jars and add your jar file.
First of all to reiterate what was said in the previous comment..
A "Library Project" in Android terms is not just a dependent project or an external jar. It is an Android concept introduced by the Android team see below...
http://developer.android.com/guide/developing/eclipse-adt.html
Tiger, have you found a workaround to this yet?
I'm having exactly the same issue and after battling with this for a while now I'm pretty sure it's a bug (but this particular bug is quite old and might just look very similar) Have a look at:
http://code.google.com/p/android/issues/detail?id=8498
Yes, it appears that certain SDK levels in Linux aren't supporting the "--auto-add-overlay" option required when using libraries in Eclipse. I've found that 1.6 works find, as does 2.1-update1, but 2.0 fails. I ended up changing my app to rely on 2.1 instead of 2.0 and it worked.

Categories

Resources