Page 1 of 1

Complete Noob Android Development

Posted: Wed Aug 07, 2013 4:06 pm
by Xaos
So, I'm in the process of learning Java. For a project i'm doing for Biology class, I want to create an App. I've already coded this in PHP. I downloaded the Android SDK and eclipse. I've got everything set up, i've got my buttons set up, but now I have absolutely no idea where to go.

I've got this : http://gyazo.com/3c6feb1401f54a5574d9d842b00c6064

I want to make it so you click on a button, it gives you a list of options to choose from (1-10 in most cases). Then when you hit simulate it takes all of those and executes the code (which I have to translate to Java). My questions are:


How do I make a new screen? How do I make lists pop up upon clicking the boxes? Where do I put the code?

Basically. How i make thingy thingy worky worky. Sorry for the absolute noobest question ever. But gotta learn somehow I guess.

Re: Complete Noob Android Development

Posted: Wed Aug 07, 2013 8:05 pm
by Jackolantern
I don't really know how to help short of linking a complete tutorial, so I would check out this tutorial here. This should contain the answers to your questions, except perhaps how to make it multi-page, which, if I remember correct, are called "Activities" in Android. It is a bit more complicated than being exactly a page, but I believe every Activity can have its own XML UI file.

Re: Complete Noob Android Development

Posted: Wed Aug 07, 2013 8:32 pm
by Xaos
Thanks. Looks more helpful than some others I've read. I think I'm having eclipse problems. Something about cant find the main?

Re: Complete Noob Android Development

Posted: Wed Aug 07, 2013 11:24 pm
by Jackolantern
You are actually getting an error when you try to run the app?

Re: Complete Noob Android Development

Posted: Thu Aug 08, 2013 12:12 am
by Xaos
Jackolantern wrote:You are actually getting an error when you try to run the app?
ye ah

Re: Complete Noob Android Development

Posted: Thu Aug 08, 2013 1:21 am
by Jackolantern
What happens when you start a new project and then just try to run that (before doing anything to it). Does it work or do you get the error?

Re: Complete Noob Android Development

Posted: Thu Aug 08, 2013 2:52 am
by Xaos
Jackolantern wrote:What happens when you start a new project and then just try to run that (before doing anything to it). Does it work or do you get the error?
"Selection does not have main type"

same error

Re: Complete Noob Android Development

Posted: Thu Aug 08, 2013 3:18 am
by Xaos
Okay I think I got it. Rather than create a new file, create a new class. Seems like a workaround though...

Re: Complete Noob Android Development

Posted: Thu Aug 08, 2013 3:21 am
by Jackolantern
Weird. I hate to say it but I think you need to uninstall everything, and re-install. If you downloaded stuff separately and installed it using an existing Eclipse installation, get the all-in-one ADT download, which includes everything, including Eclipse. And since Eclipse is a non-installed executable, you can have multiple editions on your computer provided they aren't in the same folder. The all-in-one-installation really cuts down on issues you can have, since everything is tuned for Android development.

EDIT: If I remember right, a blank Android app should compile and run with a blank screen on the emulator or device. That still sounds like a problem with your setup.

Re: Complete Noob Android Development

Posted: Thu Aug 08, 2013 3:42 am
by Xaos
I installed it as an all-in-one, and just general eclipse was giving me the weird errors, the android part included. I think its because I was just making a new file and not a .java file?