Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Ads interface in Android Studio crashes app — Gideros Forum

Ads interface in Android Studio crashes app

CesarCesar Member
edited June 2016 in General questions
I have completed all the steps for a simple adMob banner but the application crashed when initialized.

Has anybody achieved the ads interface work in the current Android Studio Version?

The code in gideros is simple:
require "ads"
local pub = Ads.new("admob")
pub:setKey("ca-app-pub-9696773736012633/1518340905")
pub:enableTesting(true)
pub:showAd("banner")
Thank you

Comments

  • simwhisimwhi Member
    @Cesar This looks correct, but you do not need to pass TRUE to enableTesting. I'm not sure if this is your issue though.

    Have you tried testing from Android Studio?
  • CesarCesar Member
    edited June 2016
    enableTesting is not the problem

    From android Studio:

    [...]
    --------- beginning of crash
    06-09 12:19:57.212 3996-4066/com.telytec.ads E/AndroidRuntime: FATAL EXCEPTION: GLThread 201
    Process: com.telytec.ads, PID: 3996
    java.lang.IllegalArgumentException: No config chosen
    at android.opengl.GLSurfaceView$BaseConfigChooser.chooseConfig(GLSurfaceView.java:870)
    at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:1024)
    at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1401)
    at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)
    06-09 12:19:57.746 3996-3996/com.telytec.ads A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x1c8 in tid 3996 (com.telytec.ads)

    Any idea?
  • piepie Member
    @Cesar are you using admob only? It's the first time I see com.telytec.ads :)

    Did you try following this post?
    http://giderosmobile.com/forum/discussion/5922/solved-problem-running-admob-on-android/p1
  • hgy29hgy29 Maintainer
    @Cesar, does any gideros app actually run on your phone ?

    I don't know if 'No config choosen' actually means 'No config chooser selected' or 'The config chooser didn't find any suitable config'. If this the latter, then your phone doesn't support whatever AdMob or gideros requires.

    If the problem occurs even with a blank gideros project, then your phone doesn't meet gideros OpenGL requirements, most probably your phone's GPU doesn't support stencil...
  • CesarCesar Member
    It fails in both Android Emulator Nexus S and my real phone Samsung Core Prime.
    I can run all the gideros examples in both phones too.
  • hgy29hgy29 Maintainer
    Fine, so the issue is not with gideros itself, but with the Ad engine, or maybe some initialisation issue
  • CesarCesar Member
    Yes, it's a little difficult for me. I will try another time in the future. May be I need more experience with Android Studio. Thank you.
Sign In or Register to comment.