tus / tus-android-client

The tus client for Android.
https://tus.io/
161 stars 46 forks source link

+ build was failing on newer android studio versions, updating variou… #20

Closed abhishekBansal closed 6 years ago

abhishekBansal commented 6 years ago

…s gradle parameters

Acconut commented 6 years ago

I am not too deep in the Android development world, but would you mind explaining the build errors that you got?

abhishekBansal commented 6 years ago

Sure

  1. Gradle version was too old it wasn't supported on latest Android Studio
  2. compile and testCompile are now deprecated
  3. targetSDK, compileSDK and buildToolVersions were too old to be compiled with Android Studio 3.1+
  4. Newer SDK versions require Google maven repositories
Acconut commented 6 years ago

Ok, that makes sense, thank you. I am only wondering if it was necessary to change the minSdkVersion for the library and example? Could this change lead to build failures for library users?

abhishekBansal commented 6 years ago

So min SDK version had some discrepancy, library minSDK version was 4 while application minSDK version was 7. Applications can/should not have min SDK version higher then library. Keeping minSDK 14 is pretty safe as 99.5% users are on Android devices that have SDK versions 15+ as you can see here https://developer.android.com/about/dashboards/

Acconut commented 6 years ago

Ok, but can we also keep the minSdkVersion at 7? I don't think we need any features that are available for the api version 8+. I am well aware that this will increase the share of supported android devices not significantly but I don't see a reason to bump the minimum SDK version without an actual need for it. What do you think?

abhishekBansal commented 6 years ago

So com.android.support:appcompat-v7:27.1.1 declares minSDKVersion as 14. This will still fail ManifestMerger step in build process. I would strongly recommend keeping SDK version 14 as Android Studio itself suggests incrementing it to 14 when set to 7.

Acconut commented 6 years ago

That makes sense. I had to update the Android SDK version in the .travis.yml file but now it's merged, thank you