Support Library doesn't match android target version

Hi

I’m trying to comipile an app using android-23, correctly specified in the config.xml:

<preference name="android-minSdkVersion" value="16" />
<preference name="android-targetSdkVersion" value="23" />

I’m using the plugin Cordova.plugin.diagnostic@3.3.3, and it gives me this error when I compile:

values-v24.xml:3: AAPT: Error retrieving parent for item: 
No resource found that matches the given name 
'android:TextAppearance.Material.Widget.Button.Borderless.Colored'.

As I searched, I noted that this problem was a mismatch of version of the SDK and the Support Library. Indeed, that is the problem. It is trying to build with a support library 24 (hence the error at ‘values-v24’).

To fix that, I had to manually change the file ‘platform/android/project.properties’ from this:

cordova.system.library.2=com.android.support:support-v4:+
cordova.system.library.3=com.android.support:appcompat-v7:+

To this:

cordova.system.library.2=com.android.support:support-v4:23.+
cordova.system.library.3=com.android.support:appcompat-v7:23.+

Another problem is that I cant download, by any means, the package ‘Android Support Library rev 23’ since it is obsolete, I have access only to the ‘Android Support Repository rev 44’.

My question is: There is a way to specify in the config.xml or other file which version of the support library should be used? It is not handy to manually change that file every time.

I am having the same issue. your changes solved it. Thank you.

In the android sdk window, tick the “obsolete” checkbox. You can then have access to download the support library.

Im glad this helped you. By the way, ticking “obsolete” doesnt make the support library to appear, thanks by the way.

image

Did for me. Sorry it’s not the same for you! Good luck…