Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Admobv2 can not show
Started by vu07dt2 Jan 18 2016 07:54 AM

4 replies to this topic
#admob
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

vu07dt2

[GLOBAL: userInfoPane.html]
vu07dt2
  • Observer

  • 7 posts
  • Corona SDK

Hi,

 

I'm trying to add admob to my app but I can not  show any thing in my app.

 

I currently using plugin.google.play.services. This is content in my build.setting file:
 

settings =
{
   orientation =
   {
      default = "portrait",
      supported = { "portrait"},
   },
 
   iphone =
   {
      plist =
      {
         UIPrerenderedIcon = true,
      },
   },
 
   android =
   {
       usesPermissions =
       {
          "android.permission.INTERNET",
          "android.permission.ACCESS_NETWORK_STATE",
       },
   },
 
   plugins =
   {
       ["plugin.google.play.services"] =
       {
           publisherId = "com.coronalabs"
       },
   },  
}
 

In “menu.lua” I add an interstitial Banner with code:

 

local ads = require( “ads” )
local interstitialAppID = “ca-app-pub-1679022124514237/5808556504”
local adProvider = “admob”
 
local function adListener( event )
   if ( event.isError ) then
      print( “Error huhu” )
   elseif ( event.phase == “loaded” ) then
      print( “loaded hehe” )
   elseif ( event.phase == “shown” ) then
      print( “shown haha” )
   end
end
 
ads.init( adProvider, interstitialAppID, adListener )
 
if ( ads.isLoaded(“interstitial”) ) then
   ads.show(“interstitial”)
end

 

=> When I used newest version build 2810 my app crashed. After that, when I use version build 2329 it is not crash but my app show black screens and Game stucked.

 

(I tried type of Interstitial and Banner but nothing available.) 

 

Can you help me to solve this problem?

 

Thanks!

Attached Files



[TOPIC: post.html]
#2

bjsorrentino

[GLOBAL: userInfoPane.html]
bjsorrentino
  • Veteran

  • 8,506 posts
  • Corona SDK

Hi @vu07dt2,

Are you getting any errors reported in the console? If so, which the error(s)?

 

Best regards,

Brent



[TOPIC: post.html]
#3

vu07dt2

[GLOBAL: userInfoPane.html]
vu07dt2
  • Observer

  • 7 posts
  • Corona SDK

Hi Brent

 

After run this app on my device (Lenovo A859), I get log below:

 

 

Vu-no-Mac-mini:platform-tools vuphan$ ./adb logcat Corona:v *:s

--------- beginning of /dev/log/system

--------- beginning of /dev/log/main

V/Corona  (31574): > Class.forName: network.LuaLoader

V/Corona  (31574): < Class.forName: network.LuaLoader

V/Corona  (31574): Loading via reflection: network.LuaLoader

I/Corona  (31574): Platform: Lenovo A859 / ARM Neon / 4.2.2 / Mali-400 MP / OpenGL ES 2.0 / 2016.2810 / English | US | en_US | en

V/Corona  (31574): > Class.forName: plugin.fuse.LuaLoader

V/Corona  (31574): > Class.forName: CoronaProvider.licensing.google.LuaLoader

V/Corona  (31574): < Class.forName: CoronaProvider.licensing.google.LuaLoader

V/Corona  (31574): Loading via reflection: CoronaProvider.licensing.google.LuaLoader

V/Corona  (31574): > Class.forName: CoronaProvider.ads.admob.LuaLoader

V/Corona  (31574): WARNING: Could not load 'CoronaProvider.ads.admob.LuaLoader'

I/Corona  (31574): ERROR: Runtime error

I/Corona  (31574): /Users/jenkins/slaveroot/workspace/Templates/label/android/subrepos/composer/composer.lua:1451: /Users/jenkins/slaveroot/workspace/Templates/label/android/librtt/Corona/CoronaLibrary.lua:102: ERROR: Could not load provider (admob) due to the following reason: /Users/jenkins/slaveroot/workspace/Templates/label/android/platform/resources/init.lua:815: module 'CoronaProvider.ads.admob' not found:resource (CoronaProvider.ads.admob.lu) does not exist in archive

I/Corona  (31574): no field package.preload['CoronaProvider.ads.admob']

I/Corona  (31574): no file '(null)/CoronaProvider/ads/admob.lua'

I/Corona  (31574): no file '(null)/CoronaProvider/ads/admob.lua'

I/Corona  (31574): no file '/data/app-lib/com.bee.touchAndTap-1/libCoronaProvider/ads/admob.so'

I/Corona  (31574): no file './CoronaProvider/ads/admob.so'

I/Corona  (31574): no file '(null)/CoronaProvider/ads/admob.so'

I/Corona  (31574): no file '/data/app-lib/com.bee.touchAndTap-1/libCoronaProvider.so'

I/Corona  (31574): no file './CoronaProvider.so'

I/Corona  (31574): no file '(null)/CoronaProvider.so'

I/Corona  (31574): no file '/data/app-lib/com.bee.touchAndTap-1/libCoronaProvider.ads.admob.so'

I/Corona  (31574): no file './Cor

 

(i built my app withcorona ver 2810 )

 

Thanks



[TOPIC: post.html]
#4

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,895 posts
  • Enterprise

CoronaProvider.ads.admob is the name of the old AdMob V1 plugin. Are you sure you're not also including that? The build.settings above looks right, but it certainly doesn't match the error that's being reported.

 

Rob



[TOPIC: post.html]
#5

vu07dt2

[GLOBAL: userInfoPane.html]
vu07dt2
  • Observer

  • 7 posts
  • Corona SDK

OK rob, I solved this problem. I created new project (with corona v2810) and copy all file *.lua, image, data... to new project. And admob showed.

 

I still use correct build.setting file but  Last project I created about two year ago. May be this is problem?

 

Thanks! 




[topic_controls]
 
[/topic_controls]