Build issues

Monkey Forums/Monkey Beginners/Build issues

Sensei(Posted 2014) [#1]
Hey guys.

Tonight I wanted to automate my code where the build will know if I'm targetting the Ouya as apposed to Android.
I originally tried adding a variable in the config.monkey files for each target as such:
#OUYA_ENABLED=True (for ouya config.monkey file)
#OUYA_ENABLED=False (for the android config.monkey file)

Then in the code I did this:
'#If Not OUYA_ENABLED
	#OUYA = "0"
#End
#If OUYA_ENABLED
	#OUYA = "1"
#End


However, whenever I try to build for the Ouya now, I get the error:
TRANS FAILED: Error updating target project - can't find block begin tag 'TRANSCODE'. You may need to delete target .build directory.


Obviously I have deleted the folder numerous times with no solution.
Anybody have any idea how to fix the above error? I didn't mess with any other files in the monkey folder (as far as I recall) that may have caused this issue, but would appreciate if anybody knew when I need to do to get rid of that error!
I also took those changes back out and it still fails.

I also noticed that when building for Android, I get the error:
BUILD FAILED
C:\Development\android-sdk-windows\tools\ant\build.xml:542: Unable to resolve project target 'android-13'
Total time: 0 seconds
[getbuildtools] Using latest Build Tools: 20.0.0
     [echo] Resolving Build Target for MonkeyGame...
TRANS FAILED: Android build failed.


For the latter, I went to the sdk-manager and updated and also checked the box for Android 3.2(API13). Was that the right one to install, and also, why?

Too late and off to bed now so can't test now, but will try tomorrow evening again if anyone has some suggestions, thanks!


Sensei(Posted 2014) [#2]
No worries. I think something went wonky with my pc.
I thought now's as good a time as any to upgrade Monkey-X to the latest stable 80c as it appeared my 77f was broken. Alas, it worked fine tonight. No idea why!?
Anyway, all still builds and works well on 80c, so, happy days!


Volker(Posted 2014) [#3]
Great to hear..


Sensei(Posted 2014) [#4]
So, I tackled the original issue again today and I'm still left confused.
For both Android and Ouya targets (monkeydir/target/android/template/config.monkey) and (monkeydir/target/android_ouya/template/config.monkey), I added a custom pre-processor variable called #OUYA=True and #OUYA=False for the relevant targets.

In my monkey game code, I do this:
#If OUYA = True
  Import ouya ' Joystick stuff
#End


Yet it seems to me that the custom variable I added isn't being used. Any ideas why adding your own custom variable in config.monkey doesn't work when it comes to #If logic?