Issues with first attempt using Admob extension

loz666

  • Posts: 9
Hi,

I am having issues building out a very simple Stencyl project when using the admob extension.

I  have just created a simple scene and enabled the admob extension in settings.

Then added a 'when created' event.

In this event I have added an 'initialize admob' banner, and added my adunit ID.

Finally I add a 'Show admob banner ad'  (originally had this in a when drawing event).

On attempting to publish to mobile > Android I end up with the following end lines in the log;

LOG] -compile:
[LOG]     [javac] Compiling 18 source files to C:\Users\xxx\AppData\Roaming\Stencyl\stencylworks\games-generated\APK Test\Export\android\bin\bin\classes
[LOG]     [javac] C:\Users\xxx\AppData\Roaming\Stencyl\stencylworks\games-generated\APK Test\Export\android\bin\src\AdWhirl.java:77: error: AdRequest() has private access in AdRequest
[LOG]     [javac]              AdRequest adRequest = new AdRequest();
[LOG]     [javac]                                    ^
[LOG]     [javac] C:\Users\xxx\AppData\Roaming\Stencyl\stencylworks\games-generated\APK Test\Export\android\bin\src\AdWhirl.java:136: error: AdRequest() has private access in AdRequest
[LOG]     [javac]             AdRequest adRequest = new AdRequest();
[LOG]     [javac]                                   ^
[LOG]     [javac] Note: Some input files use or override a deprecated API.
[LOG]     [javac] Note: Recompile with -Xlint:deprecation for details.
[LOG]     [javac] 2 errors
[LOG] BUILD FAILED
[LOG] C:\Users\xxx\AppData\Roaming\Stencyl\stencylworks\android-sdk\android-sdk-windows\tools\ant\build.xml:713: The following error occurred while executing this line:
[LOG] C:\Users\xxx\AppData\Roaming\Stencyl\stencylworks\android-sdk\android-sdk-windows\tools\ant\build.xml:727: Compile failed; see the compiler error output for details.
[LOG] Total time: 5 seconds
[LOG] Finished building for Android (or errored out): 1
[LOG] Action: Settings
[LOG] Device OS: 5.0


Can anyone shed any light on what I am doing incorrectly?

Thanks in advance

Loz



Abliblablobla

  • *
  • Posts: 524
In your case, Stencyl is trying to use an old version of the AdMob SDK. To fix this error, do a clean install of Stencyl. To do a clean install you have to uninstall/delete your current version of Stencyl, download the latest private release and install it. Do NOT install the latest version of Stencyl over your existing one! After you have done a clean install of Stencyl, use Run > Clean Project. This should fix your issue.
.: BuruBuru :.

loz666

  • Posts: 9
Hi,

thanks for the reply.

I did as you suggested and also removed all references in the project to Admob.  I then enabled the Admob extension.

I get exactly the same error.

Do I need to delete\uninstall the Admob SDK as well?  Cannot see any way to remove it, just enable\disable.


Abliblablobla

  • *
  • Posts: 524
Are you sure you did a clean install? Did you download and install the latest private release? Did you use Run > Clean Project? I don't want to sound harsh ( :) ): I am just making sure you followed what I wrote above since many users with your same issue were able to solve it in this way.
.: BuruBuru :.

loz666

  • Posts: 9
Hi,

I uninstalled using the uninstall.exe program in the stencyl folder.

Then downloaded and installed from here;
                                         http://www.stencyl.com/download/

I then used Run > clean project after starting up Stencyl

Abliblablobla

  • *
  • Posts: 524
Ok, you have to uninstall Stencyl again and then download the latest private release, NOT the latest public release. You can find the latest private release here. Then use Run > Clean Project again.
.: BuruBuru :.

loz666

  • Posts: 9
That seems to build out with the extension enabled.  I will test further.

I was not aware of the private releases, I thought you were referring to purchased versions.  The private releases seem to be just Beta's, is that correct?

Thanks for your help.

Abliblablobla

  • *
  • Posts: 524
Yes, you can consider private releases as Stencyl's beta builds. In this case you have just downloaded Stencyl 3.2 Beta which is required if you want to use the AdMob Extension 3.0 (there is a workaround to make this extension compatible with Stencyl 3.1, but I would highly discourage using this workaround).
.: BuruBuru :.