Android compiling Problems

Previous topic - Next topic

Kitty Hello

very strange. I have spaces in both and it works.

matchy

#16
I was wondering :noggin:, when the device is connected via USB a compile and run is successful. When running the same install apk file again on the device (downloaded via smb/ftp), it can not install successfully. How can it install without USB? Is extra signing required to distribute like this?

MrTAToad

That is odd - unless of course, your device isn't set to allow third party installations...

matchy

This device doesn't connect via USB currently although it has before. I'll need to retest it with another device that does connect/htc sync on USB and awaiting response from a third.

Here is the test app if you would like to test:

http://mixer.homeip.net/temp/pendulum_v1.rar
(temp link to be removed later)

turnerb

I am also having this problem on a Motorola Photon 4G.  To test I built the Arkanoid sample, it installs to the emulator just fine.  I have JAVA_HOME with no spaces, and I have ensured my phone allows applications from unknown sources...  still get the following failure (even though it says it succeeds...)

_______________________________________
*** Configuration: ANDROID ***
precompiling:
GPC - GLBasic Precompiler V.10.074 SN:71691f45 - 3D, NET
Wordcount:119 commands
compile+link:
running Android build-script...
BUILD STAGE 1: Compile and pack
     [echo] Creating output directories if needed...
     [echo] Compiling aidl files into Java classes...
     [echo] Compiling RenderScript files into Java classes and RenderScript bytecode...
     [echo] Generating R.java / Manifest.java from the resources...
     [echo] Converting compiled files and external libraries into C:\Users\turnerb\Documents\GLBasic\GLBasic\Samples\_Projects_\Arkanoid\distribute\Android\bin\classes.dex...
     [echo] Packaging resources
     [echo] No key.store and key.alias properties found in build.properties.
     [echo] Please sign C:\Users\turnerb\Documents\GLBasic\GLBasic\Samples\_Projects_\Arkanoid\distribute\Android\bin\glbasic-unsigned.apk manually
     [echo] and run zipalign from the Android SDK tools.

BUILD SUCCESSFUL
Total time: 3 seconds
BUILD STAGE 2: Install on device
     [echo] Creating output directories if needed...
     [echo] Compiling aidl files into Java classes...
     [echo] Compiling RenderScript files into Java classes and RenderScript bytecode...
     [echo] Generating R.java / Manifest.java from the resources...
     [echo] Converting compiled files and external libraries into C:\Users\turnerb\Documents\GLBasic\GLBasic\Samples\_Projects_\Arkanoid\distribute\Android\bin\classes.dex...
     [echo] Packaging resources
     [echo] Running zip align on final apk...
     [echo] Debug Package: C:\Users\turnerb\Documents\GLBasic\GLBasic\Samples\_Projects_\Arkanoid\distribute\Android\bin\glbasic-debug.apk
     [echo] Installing C:\Users\turnerb\Documents\GLBasic\GLBasic\Samples\_Projects_\Arkanoid\distribute\Android\bin\glbasic-debug.apk onto default emulator or device...

BUILD FAILED
Q:\Compiler\platform\android\android-sdk-windows\tools\ant\main_rules.xml:641: The following error occurred while executing this line:
Q:\Compiler\platform\android\android-sdk-windows\tools\ant\main_rules.xml:271: exec returned: 1

Total time: 7 seconds
finished Android build-script.
Android=C:\Users\turnerb\Documents\GLBasic\GLBasic\Samples\_Projects_\Arkanoid\distribute\Android
success
_______________________________________
*** Finished ***
Elapsed: 18.4 sec. Time: 16:03
Build: 1 succeeded.

Spent some time trying to figure this out, but I am out of idea's.  Anyone else powered through this error?

okee

It's not finding your device, do you have the windows drivers installed ?

To check if it's connected properly
get the path to adb.exe in the android folder, on mine its in the folder:
C:\Program Files (x86)\Android\android-sdk\platform-tools
open a command prompt and type:

path C:\Program Files (x86)\Android\android-sdk\platform-tools

then type:

adb devices

and it will show what devices are attached i.e.
Code (glbasic) Select
List of devices attached
P729J_SBM      device


If no device is detected and you have your android device attached
power it off and on and reconnect and check you have the right drivers


okee
Android: Samsung Galaxy S2 -  ZTE Blade (Orange San Francisco) - Ainol Novo 7 Aurora 2
IOS: 2 x Ipod Touch (1G)

turnerb

That fixed it.  I had no idea for Android development you have to go get the USB device drivers from each manufacturer (Motorola, HTC, LG, etc...) to do development.  In my case, I had to install from http://developer.motorola.com/docstools/USB_Drivers/

All is working well now.

Thanks for the tip about using ADB.exe Devices to find the devices that were attached.  That is how I knew the issue was fixed.  Before I got the driver, it said there were no devices, after I installed the driver, it showed my device.

Thanks

MrTAToad

Yes, Google dont make things easy...

Wampus

I'm getting this error today on both computers I connect to my Android phone. Was working fine until this morning. Nothing was changed by me on the device or the computers. Since then I've tried changing the settings on the phone but I'm still seeing no devices being recognised. So strange.

Updating the terrible software Samsung supply with the phone and may reinstall the driver altogether. Maybe that will improve matters.

Wampus

After HOURS OF PAIN I found that the goddamn USB cable was bad! Came with some cheap aftermarket charger and I had no idea I'd picked that one up instead of the standard cable.

Marmor

 :noggin:my best usb cable are from palm/hp and comes with the touchpad/pre
get some frome hp /palm on ebay its a bit bigger as the others because the Devices need 2A  :good: