Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Yes, if you're using an emulator it compiles to its API version. You initially set a target API version when setting up a project, though, and that's what it usually defaults to.
-
julianmd5058y@liveCoder Don't think so. I'm literally talking about the tutorial from Android Studio, like the blank activity.
-
julianmd5058y@liveCoder Android apps call OS APIs, if I understand correctly, and those get updated which each new major version. Some devices support new ones, others only old ones and, based on that, you make your app available to more users (by decreasing the minimum API version requirement in your app). And you have the option of selecting your API, but when you first start Android Studio, the main documentation page says to keep it as default (API 24), although it returns compilation errors upon running the simplest template, due to the emulated device (AS always emulates your code, apparently) not supporting API 24. I think that's what happens.
-
julianmd5058y@Trey50Daniel Thanks for the explanation, could you take a look at my other comment and let me know how much of it I got wrong? Thanks!
-
@julianmd Everything you said sounds good, but I'll just have to add a couple of things. You also have to mind the view, because different APIs allow different layouts, etc. Android Studio just gives you all of the tools to change what you want, but doesn't really tell you how to use them. It's like getting A Swiss Army Knife with all the tools open and trying to use them all at once.
-
@julianmd thats not the min sdk version, that must be the compile sdk version, go to your app folder open the build. gradle file and find min sdk version and see what number is
Can't compile the tutorial code in Android Studio without switching to an older API. Anyone know why that is? Does it have any relevance to the API supported by the emulated device?
undefined