Quantcast
Channel: Questions in topic: "crash"
Viewing all articles
Browse latest Browse all 2383

Android thread causes crash?

$
0
0
Hi, I am using a thread to initialize admob to prevent lag caused by it initializing in the player script. But whenever I launch my app, it crashes. void Start () { Thread adThread = new Thread(new ThreadStart(bannerAdSetup)); adThread.Start(); } public void bannerAdSetup() { Banner View bannerView = new BannerView( "MyAdkey", AdSize.Banner, AdPosition.Bottom); AdRequest request = new AdRequest.Builder().Build(); bannerView.LoadAd(request); } Any ideas why this crashes? Any help is greatly appreciated, thanks.

Viewing all articles
Browse latest Browse all 2383

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>