0

I just want to make a really basic android app - I'm wanting to rewrite this app: https://play.google.com/store/apps/details?id=com.backyardapps.canadianincometaxcalculator

I wrote the app, originally, in Eclipse, under SDK 9. I now want to rewrite the app, with a few updated features but still want to keep to the same simplicity in design and functionality.

My challenge is that Android Studio keeps compiling with a higher SDK than what I want, so I get the Title bar showing up (with the settings menu button) across the top on my Lollipop device. I tried changing my build.gradle Module file to a minimum and target SDK of 10, but when I do that, all of the XML relating to themes produces errors (about 189 in total).

How can I setup my Android Studio so that it uses SDK 10 as the default sdk, so I can support the maximum number of devices, and have the most consistent user experience across devices/generations? (or CAN I even do so?)

Thanks in advance, guys!

Nalorin
  • 95
  • 1
  • 9
  • if you dont want the actionbar/toolbar then you can simply specify that in your styles.xml :D – edwinj Mar 26 '15 at 08:37
  • I tried doing that, but I can't figure out how because the actionbar doesn't appear to be in the styles.xml file. And that's what really gets me - because it only shows up on API 22 for some reason... – Nalorin Mar 26 '15 at 16:13
  • I managed to at least get the actionbar to go away by playing with the styles.xml, and found out I have to explicitly say "[theme].Light.NoActionBar" in order to get it to disappear. I'm just hoping that, with a minimum SDK set to 10, I should have no problems running the app on all the desired devices, and will get a consistent experience..... *crosses fingers* Thanks for your help, guys – Nalorin Mar 26 '15 at 17:18

3 Answers3

0

You can go down to you sdk manager and download your sdk you want to develop for then change the minimum sdk in your build.gradle.enter image description here

timr
  • 6,668
  • 7
  • 47
  • 79
  • I've already tried that. The issue becomes that I want to set my TargetSDK to 10 but, when I make that change in gradle, I get a whole bunch of xml errors - primarily ones related to theme elements that cannot be found. – Nalorin Mar 26 '15 at 17:08
0

You can choose the target SDK when you create a project when it says Minimum SDK but you have to download it first

Chris
  • 1,692
  • 2
  • 17
  • 21
  • I do have the SDK for APIs 10-22 installed. It seems the problem comes when I try to build for TargetSDK 10. – Nalorin Mar 26 '15 at 16:03
  • try to create a new project and in the second window, the "Target Android Devices" one, and set the minimum SDK to whatever you want, API 8 is fine because on every devices, it also shows you the percentage of Android devices that can run your app – Chris Mar 26 '15 at 16:55
  • Already done. I have no problems setting API 10 as the minimum API. My problem comes in trying to set it as the TARGET API. – Nalorin Mar 26 '15 at 17:12
0

Have you tried specifying the SDK version in your AndroidManifest.xml file?

Add something like this just below the opening

<uses-
   android:minSdkVersion="10"
   android:targetSdkVersion="10"  />

You can put the minimum threshold as low as you want as long as you have the right build tools installed in Android Studio.

Chamatake-san
  • 551
  • 3
  • 10
  • Yes, I have tried that. And changing the AndroidManifest.xml file seems to have no change on the overall outcome - the app still builds with the actionbar at the top (a result I can't seem to change). And if I try changing the TargetSDK in the build.gradle file, I get 189 errors relating to XML theme elements. – Nalorin Mar 26 '15 at 17:15