"warning the 'ads' library is not available on this platform"

I am having some trouble adding admob ads to my program.

This is my build.settings: http://pastebin.com/pXL9zxua

and this is my relevant code: http://pastebin.com/f8LzE46Q .

I get the error: “warning the ‘ads’ library is not available on this platform”

I dont know what build I am running (but I downloaded and installed newest version today) and running on windows 8. 

The ads are not displaying when the program is run on my android device either.

any ideas?

Are you running your app in the simulator?  If so, you need to build the app and and test it on your device.  You can’t test most ad functionality on the simulator.  

Ah, I missed that you said you aren’t seeing the ads on your device.  

What does logcat show?

I’d modify the adListener to print out the event details and use logcat to examine the log.

oh, so it is not possible to test if ads work in the simulator?

EDIT: I have never used logcat before, so I am trying to do figure this out now :slight_smile:

Ok, its not my personal device so I cant root it, but I mean… Isnt this weird? I just dont see any reasons why the ads wont appear on the device? :S

Is there any ways to display the device’s log on the pc? 

Anyhow, I still cannot firgure out why the ads are not showing on the phone… Is there no way to test the ads on the simulator?

Thans for any answers :slight_smile:

  1. Nope.  You can’t test ads on the simulator.

  2. You don’t need to root your device to use logcat: http://coronalabs.com/blog/2013/07/09/tutorial-basic-debugging/ (logcat is talked about at the bottom;  you’ll need to follow this link in the post to get instructions for installing the android tools on your machine).

  3. The only way (that I know of) to see the log on your PC is with logcat.

Thanks alot for the help. The logcat posted this:

http://imgur.com/3c74Mrx

The ad request was invalid; for instance, the ad unit ID was incorrect.

Is it referring to the appID in: 

ads.init( adProvider, appID, adListener ) ?

Do I have to put the app on the Google play store before it can display the ads? 

You don’t need to have your app published on Google Play to see ads.

You do have to log into admob and create a valid appID. Once you have the appID from the admob control panel, you need to change this line of code.

local appID = “pub-xxx”

I never actually said pub-xxx, but yeah, the appID was not correct. So, I did manage to get the correct appID, and it almost works now :slight_smile: It says that the adrequest was successful, but no ad were displayed due to lack of inventory or something like that. So I think my code is correct now, but idk why it doesnt fetch any ads tho…

Are you running your app in the simulator?  If so, you need to build the app and and test it on your device.  You can’t test most ad functionality on the simulator.  

Ah, I missed that you said you aren’t seeing the ads on your device.  

What does logcat show?

I’d modify the adListener to print out the event details and use logcat to examine the log.

oh, so it is not possible to test if ads work in the simulator?

EDIT: I have never used logcat before, so I am trying to do figure this out now :slight_smile:

Ok, its not my personal device so I cant root it, but I mean… Isnt this weird? I just dont see any reasons why the ads wont appear on the device? :S

Is there any ways to display the device’s log on the pc? 

Anyhow, I still cannot firgure out why the ads are not showing on the phone… Is there no way to test the ads on the simulator?

Thans for any answers :slight_smile:

  1. Nope.  You can’t test ads on the simulator.

  2. You don’t need to root your device to use logcat: http://coronalabs.com/blog/2013/07/09/tutorial-basic-debugging/ (logcat is talked about at the bottom;  you’ll need to follow this link in the post to get instructions for installing the android tools on your machine).

  3. The only way (that I know of) to see the log on your PC is with logcat.

Thanks alot for the help. The logcat posted this:

http://imgur.com/3c74Mrx

The ad request was invalid; for instance, the ad unit ID was incorrect.

Is it referring to the appID in: 

ads.init( adProvider, appID, adListener ) ?

Do I have to put the app on the Google play store before it can display the ads? 

You don’t need to have your app published on Google Play to see ads.

You do have to log into admob and create a valid appID. Once you have the appID from the admob control panel, you need to change this line of code.

local appID = “pub-xxx”

I never actually said pub-xxx, but yeah, the appID was not correct. So, I did manage to get the correct appID, and it almost works now :slight_smile: It says that the adrequest was successful, but no ad were displayed due to lack of inventory or something like that. So I think my code is correct now, but idk why it doesnt fetch any ads tho…