Getting started

Put your problem here if it does not fit any of the other categories.

Getting started

Postby wolfric » Sat Dec 26, 2009 2:43 am

Ok bit embarasing but i'm following just the basic: http://developer.android.com/resources/ ... world.html
I've got eclipse for java and sdk for windows downloaded today here( http://developer.android.com/sdk/index.html)

Ran through the tutorial but instead of running hello world when i click run and application, it just loads up android without running the program. Now i assumed that going into menu and clicking the "hello android" program would work but i'm starting to wonder is this pre built? The reason being when i got as far as the xml change and changed the string and applied all the changes required (shut down the emulation) and ran the program again (automatic build turned on by default) the program didn't change. I don't get the pure app window like most of the screenshots get i get this:
Image

Am i doing something wrong?
I've def saved all files
Manually rebuild didn't change anything
closed down emulator before restarting
haven't changed the default my_avd that is visible in sdk and avd manager
don't touch any buttons before it's loaded


Also: editing original code without editing the xml directly doesn't result in the hello android app changing.
Last edited by wolfric on Sat Dec 26, 2009 2:50 am, edited 1 time in total.
wolfric
Freshman
Freshman
 
Posts: 7
Joined: Sat Dec 26, 2009 2:34 am

Top

Postby hellshady00 » Sat Dec 26, 2009 2:50 am

What happens if you run

adb -e logcat

does it show that it has installed the app?
User avatar
hellshady00
Developer
Developer
 
Posts: 29
Joined: Thu Dec 24, 2009 11:29 pm
Location: Florida

Postby wolfric » Sat Dec 26, 2009 2:54 am

I assume you mean just running it straight from cmd in the tools folder. Came up waiting for device. That was both while that android phone window was open and closed.

Is it supposed to look like that and all the screenshots are cropped or am i doing something wrong?
wolfric
Freshman
Freshman
 
Posts: 7
Joined: Sat Dec 26, 2009 2:34 am

Postby hellshady00 » Sat Dec 26, 2009 2:58 am

Right.

Run the android application from eclipse, and after the emulator loads up do
adb -e logcat

Does it show the logs? If its still only showing "Waiting for device" after the emulator loads up, then try creating a new AVD
User avatar
hellshady00
Developer
Developer
 
Posts: 29
Joined: Thu Dec 24, 2009 11:29 pm
Location: Florida

Postby wolfric » Sat Dec 26, 2009 3:05 am

No still getting waiting for device . I did path\tools>android create avd --force --target 2 --name my_avd and replaced it as the tutorial showed http://developer.android.com/resources/ ... d.html#avd just to make sure i got a clean start.

It looks like android is running on an earlier version now but no change.

Is the app supposed to start up itself? Is it supposed to be inside the window? (This seemingly earlier version doesn't have a hello android)

I've def got the package open and the plugin set up as showed (and sdk dir set up) and the package is an android one.
wolfric
Freshman
Freshman
 
Posts: 7
Joined: Sat Dec 26, 2009 2:34 am

Postby hellshady00 » Sat Dec 26, 2009 3:10 am

Yup, the app should start itself after the emulator loads.

And btw, yes its supposed to look like that unless you have the hardware keyboard disabled in the AVD

Try creating a new AVD with the GUI
in eclipse, at the top goto
Window -> Android SDK and AVD Manager

Make sure the AVD target is the same as what you have your project set to in
Project -> Properties -> Android
User avatar
hellshady00
Developer
Developer
 
Posts: 29
Joined: Thu Dec 24, 2009 11:29 pm
Location: Florida

Top

Postby wolfric » Sat Dec 26, 2009 3:15 am

the project target is "android 1.1" the lowest level version of android. Theres a list of all the androids 1.1-2.01 and google API (1.5-2.0.1)

Should additional avd be displayed and targeted here?
wolfric
Freshman
Freshman
 
Posts: 7
Joined: Sat Dec 26, 2009 2:34 am

Postby hellshady00 » Sat Dec 26, 2009 3:19 am

Nope, that seems right.

If your project build target is set to Android 1.1 then make sure the AVD you create is set for Android 1.1 as well
User avatar
hellshady00
Developer
Developer
 
Posts: 29
Joined: Thu Dec 24, 2009 11:29 pm
Location: Florida

Postby wolfric » Sat Dec 26, 2009 3:23 am

I don't see any options to set which virtual device the application is to use though. I've scrolled back through all the tutorials and i don't see a mention of it.

edit: i've made a new one called myavd1 platform 1.5 created touch screen battery keyboard etc just to make sure. Eclipse launches myavd1 when it runs the code but still no hello world popping up.
Last edited by wolfric on Sat Dec 26, 2009 3:28 am, edited 1 time in total.
wolfric
Freshman
Freshman
 
Posts: 7
Joined: Sat Dec 26, 2009 2:34 am

Postby hellshady00 » Sat Dec 26, 2009 3:28 am

Nope, eclipse automatically selects the best AVD depending on the project build target and your AVD target version.

As long as both your AVD target and project build target is set to Android 1.1 you should be fine.

After making that new AVD things should work fine, are you still having trouble?

Edit:
Hmm, try running
adb -e logcat
again, though im guessing it will still say "Waiting for device"

seems strange that adb isnt wanting to connect to your emulator, thats the problem. Eclipse uses adb to install and run the application on the emulator
Last edited by hellshady00 on Sat Dec 26, 2009 3:31 am, edited 1 time in total.
User avatar
hellshady00
Developer
Developer
 
Posts: 29
Joined: Thu Dec 24, 2009 11:29 pm
Location: Florida

Postby wolfric » Sat Dec 26, 2009 3:30 am

Yes see previous edit: emulates fine but no application running. Can't find it in package browser or programs window on the android emulation either.
wolfric
Freshman
Freshman
 
Posts: 7
Joined: Sat Dec 26, 2009 2:34 am

Postby hellshady00 » Sat Dec 26, 2009 3:39 am

Im really not sure what the problem is, as long as the emulator is running the adb should be able to connect

does running
adb devices
show anything?

Im guessing not.
User avatar
hellshady00
Developer
Developer
 
Posts: 29
Joined: Thu Dec 24, 2009 11:29 pm
Location: Florida

Postby wolfric » Sat Dec 26, 2009 3:42 am

List of Devices attached
empty line
end
wolfric
Freshman
Freshman
 
Posts: 7
Joined: Sat Dec 26, 2009 2:34 am

Postby hellshady00 » Sat Dec 26, 2009 3:52 am

Sorry, i dont think i can be anymore help here.

As far as i know there isnt any reason adb wouldn't detect the emulator, all i can suggest is doing a clean install of the Android SDK, eclipse isnt the problem so dont worry about that.

I dont think it will do any good, but maybe just restarting your comp?

Are you on vista? Maybe you should try running cmd as admin, then see if "adb devices" shows anything, maybe thats the problem? If that works, then just run eclipse as admin and that should work.

Im out of ideas now
User avatar
hellshady00
Developer
Developer
 
Posts: 29
Joined: Thu Dec 24, 2009 11:29 pm
Location: Florida

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 21 guests