• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Build versions

23tony

Well-Known Member
I recently implemented ads with adMob in my app. In doing so, in order to get everything working right, I ended up raising the compileSdbVersion to 28 and the min & target versions to 26, base OS Oreo 8.0. Prior to this implementation, I was having no problems running on 7.0

Of course, this means that 7.0 devices can't run the app.

But the downside is that, according to the distribution chart, that means my app only runs on ~40% of devices. That's 60% that I'm missing.

I have a lot of trouble working with all the different configurations in gradle - when I change things, I'm constantly getting build errors or "unable to link resource" errors, stuff like that.

Can anyone point me to a resource or offer some advice on how to (a) have ads and (b) be available to a majority of devices (looks like I need to hit 6.0 for that)? Or even just something to help me understand how to work with gradle better, so I can work around these issues?
 
I recently implemented ads with adMob in my app. In doing so, in order to get everything working right, I ended up raising the compileSdbVersion to 28 and the min & target versions to 26, base OS Oreo 8.0. Prior to this implementation, I was having no problems running on 7.0

Of course, this means that 7.0 devices can't run the app.

But the downside is that, according to the distribution chart, that means my app only runs on ~40% of devices. That's 60% that I'm missing.

I have a lot of trouble working with all the different configurations in gradle - when I change things, I'm constantly getting build errors or "unable to link resource" errors, stuff like that.

Can anyone point me to a resource or offer some advice on how to (a) have ads and (b) be available to a majority of devices (looks like I need to hit 6.0 for that)? Or even just something to help me understand how to work with gradle better, so I can work around these issues?

Admob works on much older android versions. I have it on as low as SDK 15 (android 4.x) while targeting the latest.

This is one of those situations where it is very difficult to assist you because it's your production code which noone can see to be able to help.

I wrote a tutorial on how to add Admob to apps which shows exactly how I do it. Full code is included and sample app. If you're interested I can link you to it.
 
Admob works on much older android versions. I have it on as low as SDK 15 (android 4.x) while targeting the latest.

This is one of those situations where it is very difficult to assist you because it's your production code which noone can see to be able to help.

I wrote a tutorial on how to add Admob to apps which shows exactly how I do it. Full code is included and sample app. If you're interested I can link you to it.

I figured it wasn't specifically Admob, but when I started adding it, I ended up going down a rabbit hole that led me to where I am now. I kept getting those errors, and searching for solutions, and eventually got it working - but at this cost :(

Yes, please share that link. Hopefully it will help me figure out where I went wrong and how to fix it.
 
I figured it wasn't specifically Admob, but when I started adding it, I ended up going down a rabbit hole that led me to where I am now. I kept getting those errors, and searching for solutions, and eventually got it working - but at this cost :(

Yes, please share that link. Hopefully it will help me figure out where I went wrong and how to fix it.

Sure, here's the link...
https://intechgeek.com/admob-tutorial/

Pro tip:
Look up app-ads.txt. Google/Admob should have already sent you an email about it. It will be enforced by 8/27/2019.
 
If your admob or adsense account is new then you may not receive the email, but it will still apply to you.

The basic gist of it is...

You need to list your website in the playstore listing for your app. In the root of your website you must have the app-ads.txt file(ie. www,your-domain,com/app-ads.txt). This is to eliminate ad-click-fraud. Eventually advertiser ads will only be served on apps that have a website listed with this text file.

The above will also apply to adsense for websites with ads.txt. So you'll need both files if you serve ads on both platforms.
 
Back
Top Bottom