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.
Complete Noob Android Development
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: Complete Noob Android Development
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.
The indelible lord of tl;dr
Re: Complete Noob Android Development
Thanks. Looks more helpful than some others I've read. I think I'm having eclipse problems. Something about cant find the main?
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: Complete Noob Android Development
You are actually getting an error when you try to run the app?
The indelible lord of tl;dr
Re: Complete Noob Android Development
ye ahJackolantern wrote:You are actually getting an error when you try to run the app?
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: Complete Noob Android Development
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?
The indelible lord of tl;dr
Re: Complete Noob Android Development
"Selection does not have main type"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?
same error
Re: Complete Noob Android Development
Okay I think I got it. Rather than create a new file, create a new class. Seems like a workaround though...
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: Complete Noob Android Development
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.
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.
The indelible lord of tl;dr
Re: Complete Noob Android Development
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?