# \[ANDROID\] App stops at Vungle ads.init line

**URL:** <https://forums.solar2d.com/t/android-app-stops-at-vungle-ads-init-line/342454>\
**Category:** Vungle\
**Created:** [December 19, 2016, 1:46am UTC](https://forums.solar2d.com/t/android-app-stops-at-vungle-ads-init-line/342454 "2016-12-19T01:46:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jrvwagner](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/j/94ad74/32.png) [@jrvwagner](https://forums.solar2d.com/u/jrvwagner)\
**Post date:** [December 19, 2016, 1:46am UTC](https://forums.solar2d.com/t/android-app-stops-at-vungle-ads-init-line/342454/1 "2016-12-19T01:46:27Z")

</div>

The code works on IOS, but on Android the app stops when reach vungle ads.init line

I would appreciate your support.

Android 6.0

- build. settings

[“CoronaProvider.ads.vungle”] = {  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;publisherId = “com.vungle”  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; },

- main.lua

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if platform == “iPhone OS” then  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ads.init(provider, bannerAppIDiOS, adListener)  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ads.init(provider, interstitialAppIDiOS, adListener)  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ads.init(“vungle”, “vungleAppIDiOS”, vungleAdListener)  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; elseif platform == “Android” then  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ads.init(provider, bannerAppIDAndroid, adListener)  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ads.init(provider, interstitialAppIDAndroid, adListener)  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ads.init(“vungle”, “vungleAppIDAndroid”, vungleAdListener)  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end

Regards,

Jose Roberto

---

<div class="post-metadata">

**Author:** ![rob](https://forums.solar2d.com/user_avatar/forums.solar2d.com/rob/32/4_2.png) [@rob](https://forums.solar2d.com/u/rob)\
**Post date:** [December 19, 2016, 2:41pm UTC](https://forums.solar2d.com/t/android-app-stops-at-vungle-ads-init-line/342454/2 "2016-12-19T14:41:49Z")

</div>

Hi Jose. Please use code formatting when posting code (the blue **\<\>** button in the row with Bold, Italic, etc.)

We need to see where you are defining all of your app ID’s and the provider variable. Though I think the problem may be the “” around “vungleAppIDAndroid”. I suspect you want a variable there and variables are not inside quotes.

Rob

---

<div class="post-metadata">

**Author:** ![jrvwagner](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/j/94ad74/32.png) [@jrvwagner](https://forums.solar2d.com/u/jrvwagner)\
**Post date:** [December 19, 2016, 5:14pm UTC](https://forums.solar2d.com/t/android-app-stops-at-vungle-ads-init-line/342454/3 "2016-12-19T17:14:21Z")

</div>

Thanks Rob for the reply.

I changed the AppId from a number to a variable when I posted to the forum and left the quotes by mistake. On the original code I’ve used the actual ID number.

I’ve found the error was caused by a conflict when loading other provider ads.

Regards,

Jose Roberto

---

<div class="post-metadata">

**Author:** ![rob](https://forums.solar2d.com/user_avatar/forums.solar2d.com/rob/32/4_2.png) [@rob](https://forums.solar2d.com/u/rob)\
**Post date:** [December 19, 2016, 2:41pm UTC](https://forums.solar2d.com/t/android-app-stops-at-vungle-ads-init-line/342454/4 "2016-12-19T14:41:49Z")

</div>

Hi Jose. Please use code formatting when posting code (the blue **\<\>** button in the row with Bold, Italic, etc.)

We need to see where you are defining all of your app ID’s and the provider variable. Though I think the problem may be the “” around “vungleAppIDAndroid”. I suspect you want a variable there and variables are not inside quotes.

Rob

---

<div class="post-metadata">

**Author:** ![jrvwagner](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/j/94ad74/32.png) [@jrvwagner](https://forums.solar2d.com/u/jrvwagner)\
**Post date:** [December 19, 2016, 5:14pm UTC](https://forums.solar2d.com/t/android-app-stops-at-vungle-ads-init-line/342454/5 "2016-12-19T17:14:21Z")

</div>

Thanks Rob for the reply.

I changed the AppId from a number to a variable when I posted to the forum and left the quotes by mistake. On the original code I’ve used the actual ID number.

I’ve found the error was caused by a conflict when loading other provider ads.

Regards,

Jose Roberto
