Deploying My App to my HTC Magic Android Phone

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

Deploying My App to my HTC Magic Android Phone

Postby Nemo Krad » Fri Jan 08, 2010 11:33 am

Hi all,

I have created my first simple app using Eclipse, it runs in the emulator great and does what I expect. I have signed the app using the keytool, have jarsinged it and also zipaligned it, but for the life of me I cant get it onto my device to test.

I am running Windows7 64 bit, I have the debug usb option enabled on the device, I can access the device from explorer and copy to and from it, but, Eclipse never sees the device and if I run adb.exe -d install myapp.apk I get "error: device not found".

What on earth am I doing wrong or missing, I am guessing this should be a pretty simple thing to do, but have been struggling with it for a while now.

Any help or advice is appreciated, thanks in advance
Nemo Krad
Freshman
Freshman
 
Posts: 4
Joined: Fri Jan 08, 2010 11:31 am

Top

Postby Johan Degraeve » Fri Jan 08, 2010 11:53 am

there's no need to sign or zipalign

just run 'adb install yourapp.apk' with yourapp.apk the application file generated by Eclipse which is also used when running on the emulator.

You run adb from the directory where yourapp.apk is located, and your environment (Windows or Mac OS) must find adb.

To install a new version, first uninstall using
adb uninstall yourpackagename (in my case net.johandegareve.helpdiabetes)

In a few seconds you can uninstall and re-install a new version. You can also view logs using 'adb logcat'
In fact this works so smooth that I developed a small app without ever having used the Eclipse debugger (which takes a lot more time to get it running with the emulator)
regards,

Johan
Johan Degraeve
Experienced Developer
Experienced Developer
 
Posts: 55
Joined: Tue Oct 27, 2009 1:50 pm
Location: Belgium

Postby Nemo Krad » Fri Jan 08, 2010 12:02 pm

Hi Johan,

Thanks for the reply, I am doing that, but adb.exe returns with a message saying "error: device not found" So it looks like adb.exe cant see my phone (it is pluged into the USB port by the way :P)

Even running adb without the -d gives the same error message :(

If I do adb devices I get an empty list, so I am sure the issue is not with adb but the fact that my device is not visible. Any ideas on how I can get adb to see the device?

As I said in my original post, I can see the device from the OS as I can copy to and from it..
Nemo Krad
Freshman
Freshman
 
Posts: 4
Joined: Fri Jan 08, 2010 11:31 am

Postby Johan Degraeve » Fri Jan 08, 2010 12:51 pm

It should indeed be simple. I'm using Mac where I don't see my device on 'Finder' (similar to explorer on windows).
I'm not at home right now but could it be something like 'coupling your device'

Probably I did something in the very beginning like 'sudo' or even changing some files on the device. I don't remember. I'll see at home if I can find anything in my history (it's been 3 months ago)

Or probably a bit more googling on adb, sudo, ..android .. may help you
regards,

Johan
Johan Degraeve
Experienced Developer
Experienced Developer
 
Posts: 55
Joined: Tue Oct 27, 2009 1:50 pm
Location: Belgium

Postby Nemo Krad » Fri Jan 08, 2010 1:12 pm

Just found this link, will let you know how I get on :)

http://www.mydigitallife.info/2009/08/2 ... windows-7/
Nemo Krad
Freshman
Freshman
 
Posts: 4
Joined: Fri Jan 08, 2010 11:31 am

Postby Nemo Krad » Fri Jan 08, 2010 1:32 pm

YAY! I have deployed my app!!!

All I needed to do was install HTCSync, this has soerted it all out :)

Thanks for your time looking at this, hope this helps anyone deploying from a Win7 machine in the future :D
Nemo Krad
Freshman
Freshman
 
Posts: 4
Joined: Fri Jan 08, 2010 11:31 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 12 guests