Nearly got my first Android to compile
Monkey Targets Forums/Android/Nearly got my first Android to compile
| ||
Just got this output:- Translating monkeypuzzle "C:/Program Files/Monkey/MonkeyPro46/bin/trans_winnt" -target=android "C:/Program Files/Monkey/MonkeyPro46/bananas/warpy/monkeypuzzle/monkeypuzzle.monkey" TRANS monkey compiler V1.21 Parsing... Semanting... Translating... Building... Buildfile: C:\Program Files\Monkey\MonkeyPro46\bananas\warpy\monkeypuzzle\monkeypuzzle.build\android\build.xml BUILD FAILED C:\Program Files\Monkey\MonkeyPro46\bananas\warpy\monkeypuzzle\monkeypuzzle.build\android\build.xml:65: Error. You are using an obsolete build.xml You need to delete it and regenerate it using android update project Total time: 2 seconds Android build failed. Process Complete So, what is the build.xml and why is it obsolete? okay, of to delete it... I moved it (was loathe to delete it) however I've tried the command prompt within the IDE and I cannot build a new xml file. Please help. |
| ||
Delete your build folder build entirely and also make sure you update everything in the SDK manager then try again. |
| ||
Thankyou for the suggestions. I do not have a build folder at the moment - the build.xml file that I have to delete is within the root of the following path:- C:\Program Files\Monkey\MonkeyPro46\bananas\warpy\monkeypuzzle\monkeypuzzle.build\android Aaahh, the monkeypuzzle.build directory, okay. Deleted it, still got this output: Translating monkeypuzzle "C:/Program Files/Monkey/MonkeyPro46/bin/trans_winnt" -target=android -run "C:/Program Files/Monkey/MonkeyPro46/bananas/warpy/monkeypuzzle/monkeypuzzle.monkey" TRANS monkey compiler V1.21 Parsing... Semanting... Translating... Building... * daemon not running. starting it now on port 5037 * * daemon started successfully * Buildfile: C:\Program Files\Monkey\MonkeyPro46\bananas\warpy\monkeypuzzle\monkeypuzzle.build\android\build.xml BUILD FAILED C:\Program Files\Monkey\MonkeyPro46\bananas\warpy\monkeypuzzle\monkeypuzzle.build\android\build.xml:65: Error. You are using an obsolete build.xml You need to delete it and regenerate it using android update project Total time: 0 seconds Android build failed. Process Complete Update everything in the SDK manager, okay, update manager is now updating.... Although I'd elected for API14 and API 7 initially, do you only need to install one API? My tablet uses Android 4.0.1 therefore I intended to just install API 14 - which is installed. Now it is installing API 15 which I have no hardware for at the moment. I suppose my question is will the build.xml fail due to not having a specifc revision of Android installed - I noticed on another thread for Android support that version 3.2 was compatible. |
| ||
okay, this gives me a clue: http://www.monkeycoder.co.nz/Community/posts.php?topic=1778#16749 I am running the native install of Monkey @version... the About says 0.34 but I thnik that is the IDE version No - i reckon i'm on v46 |
| ||
okay, now running v51, I believe I need to change a TARGET somewhere now: But it appears to have built - I'll try copying the executable to my Android phone..... I do not have an Android emulator running - possibly that is the issue. found this post: http://www.monkeycoder.co.nz/Community/posts.php?topic=1675#15645 Translating monkenstein "C:/Program Files/Monkey/MonkeyPro51/bin/trans_winnt" -target=android -run "C:/Program Files/Monkey/MonkeyPro51/bananas/skn3/monkenstein/monkenstein.monkey" TRANS monkey compiler V1.27 Parsing... Semanting... Translating... Building... * daemon not running. starting it now on port 5037 * * daemon started successfully * Buildfile: C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\build.xml -pre-clean: clean: BUILD SUCCESSFUL Total time: 1 second Buildfile: C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\build.xml -set-mode-check: -set-debug-files: -set-debug-mode: -debug-obfuscation-check: -setup: [echo] Gathering info for MonkeyGame... [setup] Android SDK Tools Revision 16 BUILD FAILED C:\Program Files\Android\android-sdk\tools\ant\build.xml:440: Unable to resolve target 'android-13' Total time: 0 seconds Android build failed. Process Complete Definitely something to do with a TARGET var: Translating mirror_fx_transform "C:/Program Files/Monkey/MonkeyPro51/bin/trans_winnt" -target=android -run "C:/Program Files/Monkey/MonkeyPro51/bananas/Richard_Betson/mirror_fx_transform/mirror_fx_transform.monkey" TRANS monkey compiler V1.27 Parsing... Semanting... Translating... Building... * daemon not running. starting it now on port 5037 * * daemon started successfully * Buildfile: C:\Program Files\Monkey\MonkeyPro51\bananas\Richard_Betson\mirror_fx_transform\mirror_fx_transform.build\android\build.xml -pre-clean: clean: BUILD SUCCESSFUL Total time: 0 seconds Buildfile: C:\Program Files\Monkey\MonkeyPro51\bananas\Richard_Betson\mirror_fx_transform\mirror_fx_transform.build\android\build.xml -set-mode-check: -set-debug-files: -set-debug-mode: -debug-obfuscation-check: -setup: [echo] Gathering info for MonkeyGame... [setup] Android SDK Tools Revision 16 BUILD FAILED C:\Program Files\Android\android-sdk\tools\ant\build.xml:440: Unable to resolve target 'android-13' Total time: 0 seconds Android build failed. Process Complete |
| ||
Hi, > C:\Program Files\Android\android-sdk\tools\ant\build.xml:440: Unable to resolve target 'android-13' This means you don't have the correct SDK installed. You'll need to install at least the "Android 3.2 (API 13) SDK Platform" from the SDK manager. |
| ||
Thanks Mark, I'd just been digging through the threads and had found the following WordPress Site as well that I may have a look at later: https://wiebo.wordpress.com/2011/05/08/how-to-monkey-and-android-development-setup/ Popping into the SDK manager now ;) |
| ||
So close now - I reckon I might be able to copy the file onto my phone/tablet, or kick start and Android Emulator - what will be fastest..... Translating monkenstein "C:/Program Files/Monkey/MonkeyPro51/bin/trans_winnt" -target=android -run "C:/Program Files/Monkey/MonkeyPro51/bananas/skn3/monkenstein/monkenstein.monkey" TRANS monkey compiler V1.27 Parsing... Semanting... Translating... Building... Buildfile: C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\build.xml -pre-clean: clean: BUILD SUCCESSFUL Total time: 0 seconds Buildfile: C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\build.xml -set-mode-check: -set-debug-files: -set-debug-mode: -debug-obfuscation-check: -setup: [echo] Gathering info for MonkeyGame... [setup] Android SDK Tools Revision 16 [setup] Project Target: Android 3.2 [setup] API level: 13 [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 (13) -build-setup: [echo] Creating output directories if needed... [mkdir] Created dir: C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\bin [mkdir] Created dir: C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\bin\res [mkdir] Created dir: C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\gen [mkdir] Created dir: C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\bin\classes -pre-build: -code-gen: [echo] ---------- [echo] Handling aidl files... [aidl] No AIDL files to compile. [echo] ---------- [echo] Handling RenderScript files... [renderscript] No RenderScript files to compile. [echo] ---------- [echo] Handling Resources... [aapt] Generating resource IDs... -pre-compile: -compile: [javac] Compiling 2 source files to C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\bin\classes [javac] Note: C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\src\com\monkey\MonkeyGame.java uses unchecked or unsafe operations. [javac] Note: Recompile with -Xlint:unchecked for details. -post-compile: -obfuscate: -dex: [dex] Converting compiled files and external libraries into C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\bin\classes.dex... -crunch: [crunch] Crunching PNG Files in source dir: C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\res [crunch] To destination dir: C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\bin\res [crunch] Processing image to cache: C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\res\drawable-hdpi\icon.png => C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\bin\res\drawable-hdpi\icon.png [crunch] (processed image to cache entry C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\bin\res\drawable-hdpi\icon.png: 0% size of source) [crunch] Processing image to cache: C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\res\drawable-ldpi\icon.png => C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\bin\res\drawable-ldpi\icon.png [crunch] (processed image to cache entry C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\bin\res\drawable-ldpi\icon.png: 0% size of source) [crunch] Processing image to cache: C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\res\drawable-mdpi\icon.png => C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\bin\res\drawable-mdpi\icon.png [crunch] (processed image to cache entry C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\bin\res\drawable-mdpi\icon.png: 0% size of source) [crunch] Crunched 3 PNG files to update cache -package-resources: [aapt] Creating full resource package... -package: [apkbuilder] Current build type is different than previous build: forced apkbuilder run. [apkbuilder] Creating MonkeyGame-debug-unaligned.apk and signing it with a debug key... -do-debug: [zipalign] Running zip align on final apk... [echo] Debug Package: C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\bin\MonkeyGame-debug.apk debug: [propertyfile] Creating new property file: C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\bin\build.prop [propertyfile] Updating property file: C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\bin\build.prop [propertyfile] Updating property file: C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\bin\build.prop [propertyfile] Updating property file: C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\bin\build.prop install: [echo] Installing C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\bin\MonkeyGame-debug.apk onto default emulator or device... [exec] error: device not found BUILD FAILED C:\Program Files\Android\android-sdk\tools\ant\build.xml:1124: The following error occurred while executing this line: C:\Program Files\Android\android-sdk\tools\ant\build.xml:1138: exec returned: 1 Total time: 17 seconds Android build failed. Process Complete |
| ||
okay, got my emulator running - but how do I make Monkey find it? (my emulator states 5554:bootskool in the top - found out how to start emulator from here: http://www.botskool.com/geeks/how-install-apk-files-android-windows-sdk-emulator) Translating monkenstein "C:/Program Files/Monkey/MonkeyPro51/bin/trans_winnt" -target=android -run "C:/Program Files/Monkey/MonkeyPro51/bananas/skn3/monkenstein/monkenstein.monkey" TRANS monkey compiler V1.27 Parsing... Semanting... Translating... Building... * daemon not running. starting it now on port 5037 * * daemon started successfully * Buildfile: C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\build.xml -pre-clean: clean: BUILD SUCCESSFUL Total time: 0 seconds Buildfile: C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\build.xml -set-mode-check: -set-debug-files: -set-debug-mode: -debug-obfuscation-check: -setup: [echo] Gathering info for MonkeyGame... [setup] Android SDK Tools Revision 16 [setup] Project Target: Android 3.2 [setup] API level: 13 [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 (13) -build-setup: [echo] Creating output directories if needed... [mkdir] Created dir: C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\bin [mkdir] Created dir: C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\bin\res [mkdir] Created dir: C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\gen [mkdir] Created dir: C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\bin\classes -pre-build: -code-gen: [echo] ---------- [echo] Handling aidl files... [aidl] No AIDL files to compile. [echo] ---------- [echo] Handling RenderScript files... [renderscript] No RenderScript files to compile. [echo] ---------- [echo] Handling Resources... [aapt] Generating resource IDs... -pre-compile: -compile: [javac] Compiling 2 source files to C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\bin\classes [javac] Note: C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\src\com\monkey\MonkeyGame.java uses unchecked or unsafe operations. [javac] Note: Recompile with -Xlint:unchecked for details. -post-compile: -obfuscate: -dex: [dex] Converting compiled files and external libraries into C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\bin\classes.dex... -crunch: [crunch] Crunching PNG Files in source dir: C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\res [crunch] To destination dir: C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\bin\res [crunch] Processing image to cache: C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\res\drawable-hdpi\icon.png => C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\bin\res\drawable-hdpi\icon.png [crunch] (processed image to cache entry C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\bin\res\drawable-hdpi\icon.png: 0% size of source) [crunch] Processing image to cache: C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\res\drawable-ldpi\icon.png => C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\bin\res\drawable-ldpi\icon.png [crunch] (processed image to cache entry C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\bin\res\drawable-ldpi\icon.png: 0% size of source) [crunch] Processing image to cache: C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\res\drawable-mdpi\icon.png => C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\bin\res\drawable-mdpi\icon.png [crunch] (processed image to cache entry C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\bin\res\drawable-mdpi\icon.png: 0% size of source) [crunch] Crunched 3 PNG files to update cache -package-resources: [aapt] Creating full resource package... -package: [apkbuilder] Current build type is different than previous build: forced apkbuilder run. [apkbuilder] Creating MonkeyGame-debug-unaligned.apk and signing it with a debug key... -do-debug: [zipalign] Running zip align on final apk... [echo] Debug Package: C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\bin\MonkeyGame-debug.apk debug: [propertyfile] Creating new property file: C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\bin\build.prop [propertyfile] Updating property file: C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\bin\build.prop [propertyfile] Updating property file: C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\bin\build.prop [propertyfile] Updating property file: C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\bin\build.prop install: [echo] Installing C:\Program Files\Monkey\MonkeyPro51\bananas\skn3\monkenstein\monkenstein.build\android\bin\MonkeyGame-debug.apk onto default emulator or device... [exec] Error: Could not access the Package Manager. Is the system running? [exec] 483 KB/s (99918 bytes in 0.202s) BUILD SUCCESSFUL Total time: 14 seconds * daemon not running. starting it now on port 5037 * * daemon started successfully * Error type 2 android.util.AndroidException: Can't connect to activity manager; is the system running? Process Complete |
| ||
Tried building the mirrortransform, which built successfully. I have my first .apk file ! And its running in the Emulator - Bonza!!!!![]() |
| ||
Congrats! Its always good when you get something working after fighting with it! |
| ||
@MonkeyPlotter: If that's all working, you should just be able to plug your device into the PC's USB port to automatically build and run without needing an emulator. |
| ||
@therevills - thanks, it was sweet to see that example running in the emulator after a little configuration. Now to master sleep deprivation a bit better - theres just not enough hours in the day ;) @DruggedBunny - thanks for the tip, I'll give it a whirl. It seems it cannot locate my tablet: [quote]install: Installing C:\Program Files\Monkey\MonkeyPro51\bananas\Richard_Betson\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\Android\android-sdk\tools\ant\build.xml:1124: The following error occurred while executing this line: C:\Program Files\Android\android-sdk\tools\ant\build.xml:1138: exec returned: 1 Total time: 17 seconds Android build failed. Process Complete[\quote] Any hints on how to make it realise 'where' it is? Its running Android 4.0.1 and has USB Debugging enabled and allow mock location enbled Pleased to report Emulator still works fine ;) |
| ||
Okay, I don't have an SD card on my phone - yet. Was able to navigate to the folders on my phone but was not sure where to deposit the .apk file without an SD card to put it on, in order for the appinstaller to find the apk file. However used the following website to get my executable onto my Android phone - please to report - Mirror Transform is running on my phone ;) http://www.apkinstall.com/ I needed google goggles also to use the above site. Still need to fathom why Monkey can't 'see' my phone/tablet after building. There'll be some config thing or other I've missed no doubt. |
| ||
Any hints on how to make it realise 'where' it is? Have you installed USB drivers for your device? I believe you specifically need an ADB driver (not just storage device drivers) and that these are specific to each phone, so you might have to track it down. You shouldn't have to manually copy projects over to get them to run. With my phone plugged into the PC, it shows up in the Windows Device Manager as "ADB Interface" -> "ZTE Composite ADB Interface". |
| ||
Thanks for the tip - will try it out later today. |
| ||
Hmm, giving up for now trying to find an ADB driver for my paladin - this was the closest I could find:- http://www.tabletroms.com/forums/news-rumors/3721-first-ics-tablet-6.html |
| ||
What's the exact model? They must be out there... done a bit of googling but there's a little confusion betwee the Novo models, which I believe the Paladin is. |
| ||
It is an ainol novo 7 paladin, the other 'solutions' were to install pda net, which failed with a 103,104 error. Another site suggested easy tether to obtain the necessary adb - android marketplace states incompatible with my tablet which is running ics 4.01. Was tempted to install 4.03, but then stories of novo s becoming bricks. Even installed an lg android driver on my w7 box in desperation. I am sure there will be a adb file for my tablet in time, but my digging also revealed its running a mips core instead of an arm based cpu which is beset by incompatibilities compared to the masses. Watching green day on telly now. |
| ||
Got my first monkey example compiled and running in an emulator a few posts up. Will start a new thread on the way to get an adb file on a cheap tablet. |