Android appcompat-v7, latest version?

Probably a silly question: I added a number of Android support libraries to my Silver/Cooper Android project (first time I’m toying with this). I used Add Reference / Gradle References and picked the libraries I needed. It seems that those are somewhat outdated, however (versions 25/26 instead of 28). Am I supposed to specify the version number when adding the dependencies?

You can specify a version, or *. if you specify *, the latest version found should be used (you might need to do a rebuild to force the cache to not be used.

If this doesnt help, can you post more details on how your reference looks in int project file, and a build log (rebuild, so the resolve isn’t cached), so I can have a look?

thanx!

Excerpt from build log (android-28 project, by the way):

   Adding dependency 'com.android.support:support-annotations:25.3.1' from 'com.android.support:appcompat-v7:25.3.1'.
   Adding dependency 'com.android.support:support-v4:25.3.1' from 'com.android.support:appcompat-v7:25.3.1'.
   Adding dependency 'com.android.support:support-compat:25.3.1' from 'com.android.support:support-v4:25.3.1'.
   Adding dependency 'com.android.support:support-media-compat:25.3.1' from 'com.android.support:support-v4:25.3.1'.
   Adding dependency 'com.android.support:support-core-utils:25.3.1' from 'com.android.support:support-v4:25.3.1'.
   Adding dependency 'com.android.support:support-core-ui:25.3.1' from 'com.android.support:support-v4:25.3.1'.
   Adding dependency 'com.android.support:support-fragment:25.3.1' from 'com.android.support:support-v4:25.3.1'.
   Adding dependency 'com.android.support:support-vector-drawable:25.3.1' from 'com.android.support:appcompat-v7:25.3.1'.
   Adding dependency 'com.android.support:animated-vector-drawable:25.3.1' from 'com.android.support:appcompat-v7:25.3.1'.
Exception comparing version '*' to range '25.3.1': Input string was not in a correct format.
W: Dependency com.android.support:recyclerview-v7:25.3.1: Version number mismatch between existing gradle reference com.android.support:recyclerview-v7:*.
Exception comparing version '*' to range '25.3.1': Input string was not in a correct format.
H: Adjusting dependency 'com.android.support:recyclerview-v7' from version * to 25.3.1.
   Adding dependency 'com.android.support:transition:25.3.1' from 'com.android.support:design:25.3.1'.
   Adding dependency 'com.android.support.constraint:constraint-layout-solver:1.0.2' from 'com.android.support.constraint:constraint-layout:1.0.2'.
   Adding .aar reference appcompat-v7-25.3.1.aar.
   Adding .aar reference design-25.3.1.aar.
   Adding .aar reference preference-v7-25.3.1.aar.
   Adding .aar reference recyclerview-v7-25.3.1.aar.
   Adding .aar reference constraint-layout-1.0.2.aar.
   Adding .jar reference support-annotations-25.3.1.jar.
   Adding .aar reference support-v4-25.3.1.aar.
   Adding .aar reference support-compat-25.3.1.aar.
   Adding .aar reference support-media-compat-25.3.1.aar.
   Adding .aar reference support-core-utils-25.3.1.aar.
   Adding .aar reference support-core-ui-25.3.1.aar.
   Adding .aar reference support-fragment-25.3.1.aar.
   Adding .aar reference support-vector-drawable-25.3.1.aar.
   Adding .aar reference animated-vector-drawable-25.3.1.aar.
   Adding .aar reference transition-25.3.1.aar.
   Adding .jar reference constraint-layout-solver-1.0.2.jar.

interesting. I’d love to get a test-case for this.

You have it in the project I sent you Yesterday in a PM. It covers all of the Android-related posts I made.

ah ok. I’ll have a look.

Update on this issue (using 2361): it seems the build system is still picking the 25.3.1 support libraries even though I’m building with android-28. The latest support libraries should be 28.0.0. Is there a way to refresh this list, somehow?

Is it possible that you have another library that is referencing 25.3.1? I ran across this issue when I added the Dropbox library to my app, and their library was referencing different versions of the support library than I was referencing.

Not in this case, no. I started with an empty Android project and added appcompat-v7 by itself. For some reason it dynamically picks 25.3.1.

try doing a rebuild, that should forgo any local cache and check for the latest versions on there servers, for everything.

The rebuild doesn’t seem to change anything. I did look at the .elements file and noticed a <RuntimeVersion>v25</RuntimeVersion> tag in the Debug and Release sections but I guess that’s unrelated (changing that to v28 didn’t change anything anyway).

Excerpt from the build log below:

RuntimeVersion is used only for .NET. I’ll check why its not hidden for non-/NET projects, it should be…

Hmm, odd. that setting is called Runtime, not RuntimeVersion, and it’s hidden for non-.NET projects. I wonder how it got into your project, did you create this project from template?

Yes, created from the Cooper/Silver Android Application template (the setting is not visible in Fire though, only in the .elements file - the “v25” is what caught my attention but that’s just a coincidence.

Yeah, looks like all the templates and this — this was badly let over back when we created the first Cooper templates, I guess.I’ve fixed them all — but in either case, the setting was not being used and should have no effect. You can safely remove it (or leave it).

Can you send me a small test case for the actual problem?

Will do in a few minutes.

Here it is. This is an empty project (Cooper, Silver, Android Application) created with Fire 2361. Only things I’ve changed are switching the Android SDK to android-28 and adding the 7 Gradle references through the UI.

tc_wrongreferenceversions.zip (37.3 KB)

here’s the references I get:

Although that’s different than what I’m getting, I believe they should all (aside from multidex and constraint) be 28.0.0.