Quick Links: Gideros Home | Download Gideros | Developer Guide
Ads plugin not work in 2017.8
  • Yan +1 -1
    Member
    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 ...

    Снимок1.PNG
    255 x 239 - 8K
  • hgy29hgy29 +1 -1
    Maintainer
    Is this an export or are you using standard player (which is not built with ads plugin inside) ?
  • hgy29hgy29 +1 -1
    Maintainer
    Oh and of course ads don't work on QT at all :)
  • Yan +1 -1
    Member
    hgy29 said:

    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
    Снимок1.PNG
    748 x 470 - 33K
    Снимок2.PNG
    619 x 924 - 64K
  • Yan +1 -1
    Member
    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')
    Снимок.PNG
    1095 x 609 - 72K
  • hgy29hgy29 +1 -1
    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 ?
  • Yan +1 -1
    Member
    hgy29 said:

    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 +1 -1
    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
  • Yan +1 -1
    Member
    hgy29 said:

    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.

    Снимок1.PNG
    611 x 937 - 70K
    Снимок2.PNG
    754 x 472 - 28K
    Снимок3.PNG
    471 x 270 - 12K
    Снимок5.PNG
    391 x 186 - 13K
    Снимок.PNG
    622 x 618 - 53K
  • hgy29hgy29 +1 -1
    Maintainer
    Should have warned you! GooglePlay plugin is deprecated, and you should use Gaming/GooglePlay instead
  • Yan +1 -1
    Member
    hgy29 said:

    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')
    Снимок.PNG
    1137 x 659 - 84K
  • hgy29hgy29 +1 -1
    Maintainer Accepted Answer
    I mean you don't need GooglePlay plugin (standalone one)
  • Yan +1 -1
    Member
    hgy29 said:

    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
    Снимок.PNG
    1062 x 624 - 78K
  • hgy29hgy29 +1 -1 (+1 / -0 )
    Maintainer
    Gideros should probably use something more recent than 7.8.0 as a default

    Likes: antix

  • 10.0.1 I think is the one I use.

    Edit: yep, see the screenshot...
    2017-09-30_19-16-47.png
    1047 x 531 - 53K
  • Yan +1 -1
    Member

    10.0.1 I think is the one I use.

    Edit: yep, see the screenshot...



    Thanks ! Ill try this one too.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Login with Facebook Sign In with OpenID

In this Discussion

Top Posters