• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps A Few Questions

JJackson

Newbie
Jul 22, 2010
25
0
Hello,

I am interested in learning to develop Android apps. I'm sure it is not a simple task, but I am willing to take the time to learn. My problem, however, is that 1) I don't know which language I should be learning and 2) I am unsure of the programs I need to download for app development.

Could someone please shed some light on the subject? I would appreciate any assistance!
 
The first place to go is straight to the source. :)

Unless you intend on getting down into the Android internals, Java is the language you'll want, and Eclipse is the development environment of choice. The android developers site has setup instructions and tutorials.

I highly recommend (once you're comfortable with basic Java syntax) getting the API Demo that comes with the SDK and poking around in it on the phone to see what it does, then looking at the code to see how it does it.
 
Upvote 0
The first place to go is straight to the source. :)

Unless you intend on getting down into the Android internals, Java is the language you'll want, and Eclipse is the development environment of choice. The android developers site has setup instructions and tutorials.

I highly recommend (once you're comfortable with basic Java syntax) getting the API Demo that comes with the SDK and poking around in it on the phone to see what it does, then looking at the code to see how it does it.

I installed the required Java applications, the Android SDK, and Eclipse. When I attempt to create a new project, I click "File >> New >> Android Project". After creating the project Eclipse does not populate the data. So I must be doing something wrong. I have tried multiple tutorials but I can't find one that is 100% step-by-step that I am able to easily follow.
 
Upvote 0
What "data" is it not populating? Did it create the source files and (assuming you told it to create an activity) the xml layout files in res/layout?

I was actually attempting to create it without "Activity" ticked, but when I tried clicking Activity, here's the error I got:

http://i31.tinypic.com/e6rpmc.png

Additional details: The application title was "Latest Texts" and the package title was "com.latest.texts".

Thank you for your assistance!
 
Upvote 0
I'm assuming you opened the Android SDK & AVD Manager and downloaded the APIs, yes?

n6dpo6.png



The tree there in Package Explorer is entirely empty, right?
 
  • Like
Reactions: JJackson
Upvote 0
If it still doesnt resolve R, try adding "import com.latest.texts;" to your import list.

I'm new to Android, but it seems to me that if you've just started a fresh project with the Android SDK, your starting package in src and your starting package in gen (that contains R.java) would be named the same

Or rather try right clicking com.latest.texts.com.latest in the Package Explorer and going to Refactor > Rename and changing the name to com.latest.texts
 
  • Like
Reactions: JJackson
Upvote 0
2lxii4z.png


Copy this


Project name is unrelated to your application as it pertains to the phone. It's just the project's name in Eclipse.

The build target is the version of Android you want to build for. I'm developing my current project against 2.1. This can be changed at a later date if you want to.

Application name is what will show up in Android as the name of your application.

Package name is the name of your first package. Package names are domain urls backwards. If you don't have your own webpage, just make one up like I have for you.

Create Activity will generate an Activity class for you named what you've typed.

Min SDK Version should be the value of the API column in the Build Target list for the earliest version of Android you've checked. I'm sure there's a more in-depth explanation, but I don't have it (I'm new to Android, too). I think it's just to require Android device users to have that version or greater. The checkboxes themselves don't require this. I can check 1.5 and run it on a 2.1 device as long as the APIs used aren't deprecated.
 
Upvote 0
R cannot be resolved to a variable is what I am getting.

Hi, I am new to Android. I had the same error "R cannot be resolved to a variable". This can be caused by many things. It is very important to check everything under res, especially things you changed when the problem first occured. What I had wrong was one new picture with name Car1.png but this isn' t valid name. So I changed it to car1.png and the error disappeared. Also you should check carefully your xml files for example sometimes "+" before id and if you forget you ll have R error.
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones