thekirankumar / carstream-android-auto

A youtube/plex and local video (MP4/MKV) player for Android Auto
http://www.thekirankumar.com/blog/2017/12/29/play-youtube-video-android-auto-app/
Apache License 2.0
330 stars 107 forks source link

Change build/target SDK ver (26->28), min SDK ver (15->16), and other dependency versions. #232

Open chadjoan opened 5 years ago

chadjoan commented 5 years ago

This PR is the followup to pull request #229 : "Prep work for updates of SDK (v26->v28) and other dependencies". It also follows chronologically after my other pull requests #230 : 'Solve "leaked Intent" exception.' and #231 : "Fix for APK gen exception: com.android.dex.DexException". Please merge those first to avoid merge conflicts, build errors, and other potential problems (or perhaps just merge this to pull all changes and ignore+close the others if you don't need the metadata).

Notable caveat from the commit message:

This will bump the minSdkVersion from 15 to 16. According to https://developer.android.com/about/dashboards/index.html this will make CarStream no longer work on Android 4.0.4 and earlier devices. 4.1.x and later should still work. This represents about 0.6% of the active devices in the last 7 days (0.3% for the 4.0 family plus 0.3% for the 2.3 family). One of those is probably mine, and I can't imagine actually wanting to use the thing to connect to Android Auto; maps would be sooooo slow, assuming any of it would work at all.

Hope this helps. Thank you for making this app!

thekirankumar commented 5 years ago

@chadjoan Can you please update the .travis.yml too to 28.0.3. Without that travis is not able to build.

chadjoan commented 5 years ago

I tried.

The error mentioning missing licenses is gone now. But...

The Travis script is now producing AAPT errors about the " inner element", which should have already been fixed by the commit that created the override_id_bodies.xml file. However, in this case the error message is slightly different. It is mentioning aauto-sdk-v4.5 specifically instead of just some generic project directory for merging machine generated text/code. I followed the parent commits from the commit that Travis CI tested to confirm that my earlier fix for this type of error message is still present in the codebase. And it is. So I don't think it's a problem with Travis CI building the wrong code/commit.

Prompted by the error message and noticing that build.gradle has a line "compile 'com.github.martoreto:aauto-sdk:v4.5'" in it, I went to https://github.com/martoreto/aauto-sdk to look at the res/values/ids.xml file to see what things I might need to add to override_id_bodies.xml (the error message in the Travis output seems to lack this information, unfortunately). Well, apparently that project was taken down, and a message was left: "This was an unofficial SDK for Android Auto. ... Google asked me to take it down, citing the resulting abuse." So I'm not really sure how this works in the first place: CarStream appears to depend on something that no longer exists.

Google searching aauto-sdk (along with other terms that I forget now) brought me to bluenazgul/aauto-sdk on github. This one does seem to be populated with code, but I have no idea if this is an accurate representation of what Travis CI is trying to integrate with. I suspect that it is different, actually: instead of res/values/idx.xml it has res-extra/values/ids.xml (note the "-extra" after "res") and the contents of that file seem like they would be perfectly compatible with the newer version of the build system.

I can't reproduce the error on my system. I am rebuilding (successfully) at commit 34ee553, the latest commit in this PR as of this writing. Travis CI seems to be building a different commit, 5a9e614, which is a child of 34ee553 and some other commit. I don't know how to retrieve Travis CI's commit, so right now I can't test it directly.

Given that I can't repro Travis CI's new error, and the error messages lack the identifiers that I would need for implementing the typical workaround, I am not sure how to proceed at the moment.

Let me know if you have any ideas.

In case it helps, here are a few things I could use help with:

It seems like you've been away from this project for a long time, so thank you for responding to my pull requests! And, of course, for writing this app in the first place :)

thekirankumar commented 5 years ago

How about cloning one of the repos from https://github.com/martoreto/aauto-sdk/network/members and then making changes to it and adding that as a dependency ?

chadjoan commented 5 years ago

Good idea. I'll try that when I get back to working on this.

I didn't know about that view in github. That's pretty handy.

chadjoan commented 5 years ago

Update: I'm having issues getting aauto-sdk to build as a submodule.

I made a Stack Overflow question in the hopes that someone more experienced with Gradle can help: https://stackoverflow.com/questions/56535100/with-gradle-how-do-i-use-a-dependency-subproject-that-defines-a-bunch-of-tasks