Quick Links: Download Gideros Studio | Gideros Documentation | Ultimate Guide | Gideros Development Center
Ads plugin not work in 2017.8 - Gideros Forum

Ads plugin not work in 2017.8

YanYan Member
edited September 26 in Bugs and issues
Ive tried test project from directory: All Plugins\ads\examples\GiderosProject\Ads.gproj and I get error
init.lua:1: module 'ads' not found:
no field package.preload['ads']
no file '.\ads.lua'
no file 'C:\Program Files (x86)\Gideros12\lua\ads.lua'
no file 'C:\Program Files (x86)\Gideros12\lua\ads\init.lua'
no file 'C:\Program Files (x86)\Gideros12\ads.lua'
no file 'C:\Program Files (x86)\Gideros12\ads\init.lua'
no file '.\ads.dll'
no file 'C:\Program Files (x86)\Gideros12\ads.dll'
no file 'C:\Program Files (x86)\Gideros12\loadall.dll'
stack traceback:
init.lua:1: in main chunk


My own project also give error after require 'ads'

So the empty project instantly gives error after adding ADS module, whats wrong ?

... going to download... latest build ...

Comments

  • hgy29hgy29 Maintainer
    Is this an export or are you using standard player (which is not built with ads plugin inside) ?
  • hgy29hgy29 Maintainer
    Oh and of course ads don't work on QT at all :)
  • YanYan Member
    edited September 26
    Oh and of course ads don't work on QT at all :)
    Yes, I get this error in Windows player (now I know it shouldnt work)

    If Im trying to build APK, APK builds, but instantly closes on device without an error,
    if I comment require 'ads' builded apk works fine, but I have red notice (Note: D:\UserData\AbalyanA\Desktop\Platformer\tmp\app\src\main\java\com\giderosmobile\android\plugins\ads\Ads.java uses unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details
    .)


    Separate issue
    Also problem if I trying to export APK with Enable admob support in Ads plugin, BUILD FAILS with errors
  • YanYan Member
    edited September 26
    I did now next:

    1) exported apk player with ads plugin
    2) run my project on device via wi-fi
    3) player on my device instant closes without error after uncomment
     admob = Ads.new('admob')
  • hgy29hgy29 Maintainer
    it looks like you are using an old version of google services (7.8.0). Can you try with something more recent like 9.2 or 10 ?
  • YanYan Member
    edited September 26
    it looks like you are using an old version of google services (7.8.0). Can you try with something more recent like 9.2 or 10 ?
    What are my steps to use new version of google services ? Should I download and replace any files ?
  • hgy29hgy29 Maintainer
    No, just go to Ads plugin properties and change the first line: 7.8.0 -> 9.2.0 for example. You'll need to do the same for Gaming and GooglePlayServices plugin too since you can only use one version of google services in your project
  • YanYan Member
    edited September 26
    No, just go to Ads plugin properties and change the first line: 7.8.0 -> 9.2.0 for example. You'll need to do the same for Gaming and GooglePlayServices plugin too since you can only use one version of google services in your project
    Tried re-build apk player and build failed
    ^
    symbol: class StateDeletedResult
    D:\UserData\AbalyanA\Desktop\Platformer\tmp\app\src\main\java\com\giderosmobile\android\plugins\googleplaygame\GGooglePlay.java:625: error: cannot find symbol
    if (statusCode == AppStateStatusCodes.STATUS_OK) {
    ^
    symbol: variable AppStateStatusCodes
    D:\UserData\AbalyanA\Desktop\Platformer\tmp\app\src\main\java\com\giderosmobile\android\plugins\googleplaygame\GGooglePlay.java:634: error: cannot find symbol
    if(statusCode == AppStateStatusCodes.STATUS_CLIENT_RECONNECT_REQUIRED)
    ^
    symbol: variable AppStateStatusCodes
    D:\UserData\AbalyanA\Desktop\Platformer\tmp\app\src\main\java\com\giderosmobile\android\plugins\googleplaygame\GGooglePlay.java:638: error: cannot find symbol
    else if(statusCode == AppStateStatusCodes.STATUS_NETWORK_ERROR_OPERATION_FAILED)
    ^
    symbol: variable AppStateStatusCodes
    :app:compileReleaseJavaWithJavac FAILED
     
    BUILD FAILED
     
    Total time: 2 mins 3.634 secs
    Note: Some input files use or override a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    Note: D:\UserData\AbalyanA\Desktop\Platformer\tmp\app\src\main\java\com\giderosmobile\android\plugins\ads\Ads.java uses unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    47 errors
     
    FAILURE: Build failed with an exception.
     
    * What went wrong:
    Execution failed for task ':app:compileReleaseJavaWithJavac'.
    > Compilation failed; see the compiler error output for details.
     
    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    Exec returned: 1
    Export done.

  • hgy29hgy29 Maintainer
    Should have warned you! GooglePlay plugin is deprecated, and you should use Gaming/GooglePlay instead
  • YanYan Member
    edited September 26
    Should have warned you! GooglePlay plugin is deprecated, and you should use Gaming/GooglePlay instead
    Well, Ive just deleted GooglePlayService this plugin and apk build succesfull , but unfortunately (builded with plugin) player still crashes on device after
    admob = Ads.new('admob')
  • hgy29hgy29 Maintainer
    Accepted Answer
    I mean you don't need GooglePlay plugin (standalone one)
  • YanYan Member
    edited September 26
    I mean you don't need GooglePlay plugin (standalone one)
    Okay Ive just catch a fox !

    1) It was REQUIRED to delete Google Play Service
    2) It was REQUIRED to enable ADS plugin flag - "enable Admob support"
    3) It was REQUIRED to use newer version of gpservice

    PROFIT
  • hgy29hgy29 Maintainer
    Gideros should probably use something more recent than 7.8.0 as a default

    Aye: antix

    +1 -1 (+1 / -0 ) Share on Facebook
  • SinisterSoftSinisterSoft Maintainer
    edited September 30
  • YanYan Member
    10.0.1 I think is the one I use.

    Edit: yep, see the screenshot...
    Thanks ! Ill try this one too.
Sign In or Register to comment.