New Android Target Admob v79d& v79e - Build Error

Monkey Forums/Monkey Bug Reports/New Android Target Admob v79d& v79e - Build Error

therevills(Posted 2014) [#1]
Hey Mark,

Just got around trying the new Android target and it builds non-admob projects fine... but I've just tried to build one with admobs and it fails:

H:\Dropbox\CodeMonkey\MonkeyXPro79d\Bin\transcc_winnt.exe -run -config=release -target=Android_Game_(Experimental) -modpath="H:\Dropbox\CodeMonkey\MonkeyXPro79d\modules;H:\Dropbox\CodeMonkey\MonkeyXPro79d\modules_ext;H:\Dropbox\CodeMonkey\modules;H:\Dropbox\CodeMonkey\diddyhg\src;H:\Dropbox\CodeMonkey\diddyhg\src"  "H:\Dropbox\CodeMonkey\projects\PirateSolitaireTriPeaks\PirateTriPeaksSolitaire.monkey"
TRANS monkey compiler V1.71
Parsing...
Semanting...
Translating...
Building...
Buildfile: H:\Dropbox\CodeMonkey\projects\PirateSolitaireTriPeaks\PirateTriPeaksSolitaire.buildv79d\android_new\build.xml

-check-env:
 [checkenv] Android SDK Tools Revision 22.6.4
 [checkenv] Installed at H:\Tools\Android\android-sdk

-setup:
     [echo] Project Name: MonkeyGame
  [gettype] Project Type: Application

-pre-clean:

clean:
[getlibpath] Library dependencies:
[getlibpath] 
[getlibpath] ------------------
[getlibpath] Ordered libraries:

BUILD FAILED
H:\Tools\Android\android-sdk\tools\ant\build.xml:471: The following error occurred while executing this line:
H:\Dropbox\CodeMonkey\projects\PirateSolitaireTriPeaks\PirateTriPeaksSolitaire.buildv79d\android_new\google-play-services_lib\build.xml:90: Cannot find d:\devtools\android-sdk-windows\tools\ant\build.xml imported from H:\Dropbox\CodeMonkey\projects\PirateSolitaireTriPeaks\PirateTriPeaksSolitaire.buildv79d\android_new\google-play-services_lib\build.xml

Total time: 0 secondsTRANS FAILED: Android build failed.
Abnormal program termination. Exit code: -1


Found the issue, in the template folder there is a file called "local.properties" which has the following line:
sdk.dir=d:\\devtools\\android-sdk-windows

I had to update it to where I have my android-sdk...


bazmonkey(Posted 2014) [#2]
Confirmed here (v79d). Not seen any other issues with the new admob, seems good.


therevills(Posted 2014) [#3]
Not seen any other issues with the new admob, seems good.

Yep, same here - even updated my Admob Interstitial Ad Module and it works great :)


marksibly(Posted 2014) [#4]
Hmm, that's weird - the local.properties file is created from templates/local.properties (like AndroidManifest.xml) and contains...

sdk.dir=${ANDROID_SDK_DIR}

...so it should theoretically be pointed at *your* SDK, not mine!

Another thought - did you copy across your old config.blah.txt files? The ones in the latest releases now point to my SDK, which should be OK unless you've got something installed at the same path...? Paths in config.blah.txt files are ignored if they don't actually point at something.


therevills(Posted 2014) [#5]
Yeah that is strange, I've re-downloaded v79d & v79e and you are correct that local.properties contains ${ANDROID_SDK_DIR}.

I did noticed that the latest config files contains your SDK paths, which I removed and updated to mine. I had to do a full text scan of the MonkeyX folder to find where Android was picking up d:\\devtools\\android-sdk-windows.

I'll have another go tonight with a clean "install".


Snader(Posted 2014) [#6]
Same here. Had to change the line in \templates\local.properties to sdk.dir=d:\\android-sdk


therevills(Posted 2014) [#7]
Mark, the local.properties file is also located here:
MonkeyXPro79e\targets\android_new\template\google-play-services_lib\local.properties


This file contains your SDK path...
sdk.dir=d:\\devtools\\android-sdk-windows


Too many files :)


marksibly(Posted 2014) [#8]
Nice find! The fix is likely to be a bit messy though...


marksibly(Posted 2014) [#9]
Ok, just deleting google_play_services_lib/local.properties works for me.

I *think* this is OK - if I delete the main local.properties, it barfs as expected, so I'm assuming that deleting googleplay local.properties means its using the main one instead.


therevills(Posted 2014) [#10]
Hi Mark - I havent updated to the latest MonkeyX version (v80x), but it looks like the removal of the local.properties might have caused this issue:

http://www.monkey-x.com/Community/posts.php?topic=8002&post=91711


marksibly(Posted 2014) [#11]
Please try v80b...


silentshark(Posted 2014) [#12]
Great, thanks for addressing so quickly, Mark. I will give that a go..


jayparker(Posted 2014) [#13]
I have also difficulties to get this work. I tried with Monkey v79e, but didn't get to work. I got same errors as above.
I downloaded v81b, and now I get this error:


Any suggestions?


jayparker(Posted 2014) [#14]
Found a solution, kind of...
I tested my code with Monkey v79e, 80c, 81b, 82a.
And v80c works!