HELP

Monkey Targets Forums/Android/HELP

Big Jim(Posted 2011) [#1]
BUILD FAILED
C:\Program Files (x86)\Android\android-sdk\tools\ant\main_rules.xml:486: The following error occurred while executing this line:
C:\Program Files (x86)\Android\android-sdk\tools\ant\main_rules.xml:203: apply returned: 255
Total time: 2 seconds
Android build failed.

When I try to build for Android.


therevills(Posted 2011) [#2]
Can you give us the full log?


Big Jim(Posted 2011) [#3]
here you go:


Translating mirror_fx_transform
"C:/Program Files (x86)/MonkeyPro44/bin/trans_winnt" -target=android -run "C:/Program Files (x86)/MonkeyPro44/bananas/Richard_Betson/mirror_fx_transform/mirror_fx_transform.monkey"

TRANS monkey compiler V1.17
Parsing...
Semanting...
Translating...
Building...
Buildfile: C:\Program Files (x86)\MonkeyPro44\bananas\Richard_Betson\mirror_fx_transform\mirror_fx_transform.build\android\build.xml
[setup] Android SDK Tools Revision 12
[setup] Project Target: Android 2.2
[setup] API level: 8
[setup]
[setup] ------------------
[setup] Resolving library dependencies:
[setup] No library dependencies.
[setup]
[setup] ------------------
[setup]
[setup] WARNING: Attribute minSdkVersion in AndroidManifest.xml (3) is lower than the project target API level (8)
[setup]
[setup] Importing rules file: tools\ant\main_rules.xml

clean:
[delete] Deleting directory C:\Program Files (x86)\MonkeyPro44\bananas\Richard_Betson\mirror_fx_transform\mirror_fx_transform.build\android\bin
[delete] Deleting directory C:\Program Files (x86)\MonkeyPro44\bananas\Richard_Betson\mirror_fx_transform\mirror_fx_transform.build\android\gen

BUILD SUCCESSFUL
Total time: 0 seconds
Buildfile: C:\Program Files (x86)\MonkeyPro44\bananas\Richard_Betson\mirror_fx_transform\mirror_fx_transform.build\android\build.xml
[setup] Android SDK Tools Revision 12
[setup] Project Target: Android 2.2
[setup] API level: 8
[setup]
[setup] ------------------
[setup] Resolving library dependencies:
[setup] No library dependencies.
[setup]
[setup] ------------------
[setup]
[setup] WARNING: Attribute minSdkVersion in AndroidManifest.xml (3) is lower than the project target API level (8)
[setup]
[setup] Importing rules file: tools\ant\main_rules.xml

-debug-obfuscation-check:

-set-debug-mode:

-compile-tested-if-test:

-pre-build:

-dirs:
[echo] Creating output directories if needed...
[mkdir] Created dir: C:\Program Files (x86)\MonkeyPro44\bananas\Richard_Betson\mirror_fx_transform\mirror_fx_transform.build\android\bin
[mkdir] Created dir: C:\Program Files (x86)\MonkeyPro44\bananas\Richard_Betson\mirror_fx_transform\mirror_fx_transform.build\android\gen
[mkdir] Created dir: C:\Program Files (x86)\MonkeyPro44\bananas\Richard_Betson\mirror_fx_transform\mirror_fx_transform.build\android\bin\classes

-aidl:
[echo] Compiling aidl files into Java classes...

-renderscript:
[echo] Compiling RenderScript files into Java classes and RenderScript bytecode...

-resource-src:
[echo] Generating R.java / Manifest.java from the resources...

-pre-compile:

compile:
[javac] C:\Program Files (x86)\Android\android-sdk\tools\ant\main_rules.xml:384: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 2 source files to C:\Program Files (x86)\MonkeyPro44\bananas\Richard_Betson\mirror_fx_transform\mirror_fx_transform.build\android\bin\classes
[javac] Note: C:\Program Files (x86)\MonkeyPro44\bananas\Richard_Betson\mirror_fx_transform\mirror_fx_transform.build\android\src\com\monkey\MonkeyGame.java uses unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.

-post-compile:

-obfuscate:

-dex:
[echo] Converting compiled files and external libraries into C:\Program Files (x86)\MonkeyPro44\bananas\Richard_Betson\mirror_fx_transform\mirror_fx_transform.build\android\bin\classes.dex...
[apply] =C:\Program was unexpected at this time.
BUILD FAILED
C:\Program Files (x86)\Android\android-sdk\tools\ant\main_rules.xml:486: The following error occurred while executing this line:
C:\Program Files (x86)\Android\android-sdk\tools\ant\main_rules.xml:203: apply returned: 255
Total time: 2 seconds
Android build failed.

Process Complete


therevills(Posted 2011) [#4]
Android has an issue when the compiled code is in a folder path that contains spaces.

Move your MonkeyPro44 from:

C:/Program Files (x86)/MonkeyPro44/

To:

C:/MonkeyPro44/


Big Jim(Posted 2011) [#5]
Well, it's failing for a different reason now,


Translating mirror_fx_transform
"C:/Program Files (x86)/MonkeyPro44/bin/trans_winnt" -target=android -run C:/Projects/Personal/Monkey/Android/mirror_fx_transform/mirror_fx_transform.monkey

TRANS monkey compiler V1.17
Parsing...
Semanting...
Translating...
Building...
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
Buildfile: C:\Projects\Personal\Monkey\Android\mirror_fx_transform\mirror_fx_transform.build\android\build.xml
[setup] Android SDK Tools Revision 12
[setup] Project Target: Android 2.2
[setup] API level: 8
[setup]
[setup] ------------------
[setup] Resolving library dependencies:
[setup] No library dependencies.
[setup]
[setup] ------------------
[setup]
[setup] WARNING: Attribute minSdkVersion in AndroidManifest.xml (3) is lower than the project target API level (8)
[setup]
[setup] Importing rules file: tools\ant\main_rules.xml

clean:
[delete] Deleting directory C:\Projects\Personal\Monkey\Android\mirror_fx_transform\mirror_fx_transform.build\android\bin
[delete] Deleting directory C:\Projects\Personal\Monkey\Android\mirror_fx_transform\mirror_fx_transform.build\android\gen

BUILD SUCCESSFUL
Total time: 0 seconds
Buildfile: C:\Projects\Personal\Monkey\Android\mirror_fx_transform\mirror_fx_transform.build\android\build.xml
[setup] Android SDK Tools Revision 12
[setup] Project Target: Android 2.2
[setup] API level: 8
[setup]
[setup] ------------------
[setup] Resolving library dependencies:
[setup] No library dependencies.
[setup]
[setup] ------------------
[setup]
[setup] WARNING: Attribute minSdkVersion in AndroidManifest.xml (3) is lower than the project target API level (8)
[setup]
[setup] Importing rules file: tools\ant\main_rules.xml

-debug-obfuscation-check:

-set-debug-mode:

-compile-tested-if-test:

-pre-build:

-dirs:
[echo] Creating output directories if needed...
[mkdir] Created dir: C:\Projects\Personal\Monkey\Android\mirror_fx_transform\mirror_fx_transform.build\android\bin
[mkdir] Created dir: C:\Projects\Personal\Monkey\Android\mirror_fx_transform\mirror_fx_transform.build\android\gen
[mkdir] Created dir: C:\Projects\Personal\Monkey\Android\mirror_fx_transform\mirror_fx_transform.build\android\bin\classes

-aidl:
[echo] Compiling aidl files into Java classes...

-renderscript:
[echo] Compiling RenderScript files into Java classes and RenderScript bytecode...

-resource-src:
[echo] Generating R.java / Manifest.java from the resources...

-pre-compile:

compile:
[javac] C:\Program Files (x86)\Android\android-sdk\tools\ant\main_rules.xml:384: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 2 source files to C:\Projects\Personal\Monkey\Android\mirror_fx_transform\mirror_fx_transform.build\android\bin\classes
[javac] Note: C:\Projects\Personal\Monkey\Android\mirror_fx_transform\mirror_fx_transform.build\android\src\com\monkey\MonkeyGame.java uses unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.

-post-compile:

-obfuscate:

-dex:
[echo] Converting compiled files and external libraries into C:\Projects\Personal\Monkey\Android\mirror_fx_transform\mirror_fx_transform.build\android\bin\classes.dex...

-package-resources:
[echo] Packaging resources
[aapt] Creating full resource package...

-package-debug-sign:
[apkbuilder] Creating MonkeyGame-debug-unaligned.apk and signing it with a debug key...

debug:
[echo] Running zip align on final apk...
[echo] Debug Package: C:\Projects\Personal\Monkey\Android\mirror_fx_transform\mirror_fx_transform.build\android\bin\MonkeyGame-debug.apk

install:
[echo] Installing C:\Projects\Personal\Monkey\Android\mirror_fx_transform\mirror_fx_transform.build\android\bin\MonkeyGame-debug.apk onto default emulator or device...
[exec] error: device not found
BUILD FAILED
C:\Program Files (x86)\Android\android-sdk\tools\ant\main_rules.xml:653: The following error occurred while executing this line:
C:\Program Files (x86)\Android\android-sdk\tools\ant\main_rules.xml:271: exec returned: 1
Total time: 4 seconds
Android build failed.

Process Complete



I'm using an Acer Iconia 500 running Android 3.1 and it's connected to my computer via usb.


therevills(Posted 2011) [#6]
Is your device in USB debug mode?


Big Jim(Posted 2011) [#7]
USB Debugging is enabled, and Unknown Sources is enabled.


therevills(Posted 2011) [#8]
Does your device show up in DDMS?


Big Jim(Posted 2011) [#9]
What is DDMS?


therevills(Posted 2011) [#10]
Dalvik Debug Monitor Server, its a tool within the Android folders - it should show your devices when they are connected to the PC.

Also you could try typing "adb devices" from the command prompt.


Big Jim(Posted 2011) [#11]
k, it's not showing up in DDMS, but I can see it on "My Computer" and browse through the file system.


therevills(Posted 2011) [#12]
Okay... you shouldnt be able to browse through the file system, when you plugged it in did you hit "Turn on USB storage"? If you did - dont!


Big Jim(Posted 2011) [#13]
It wasn't an option.


therevills(Posted 2011) [#14]
On your device go to Settings > SD card & phone storage

Is "Mass storage only" ticked? If so untick it.


Big Jim(Posted 2011) [#15]
Can't find that in Settings. All I get when I tap on Storage is a display of how the memory is being distributed (over apps, downloads, pictures, etc)

This is a tablet, not a phone, does that make a difference?
Acer Iconia 500 Tablet w/16GB of internal storage.

I was able to manually copy the MonkeyGameDebug.apk file over and install it, and the application runs (firepaint was pretty cool). I hope I don't have to do this *every* time I want to see my app. on the tablet.


MikeHart(Posted 2011) [#16]
I get this error ever other compile process. Every second one it works.


MikeHart(Posted 2011) [#17]
What connection type did you select. I have selected disk drive.

Maybe start apk manually before.


Uncle(Posted 2011) [#18]
I sometimes also get this error, and usually disconnecting the machine by pulling the usb cable out of the pc end and reinserting usually fixes it for me. Funny it doesnt work if I pull the cable out of the phone end. It's odd but it works me.


Big Jim(Posted 2011) [#19]
I guess I'll have to keep manually copying the apk over and testing that way. I don't know.

Basic4Android doesn't give me any trouble.