How to downgrade Data binding libary to use only 25 version? - android

I'm stuck on compileSdkVersion 25 and targetSdkVersion 25 (not allowed to update), latest Data binding libary requires 26+ and return error if I compile using 25. (path-to-app\app\build\intermediates\data-binding-layout-out\debug\values-v26\values-v26.xmlError:(15, 21) No resource found that matches the given name: attr 'android:keyboardNavigationCluster'.) And chance to downgrade ?

Related

Correct build version to use Google API

I want to use com.android.future.usb.UsbManager; in my project. This class comes with google api. I created a new project and from the project structure settings ( I use android studio) I changed the compile SDK version to Google APIs (API 19) and the Build tool version to 19.1.0
My build.gradle file is as following, but I get couple of errors.
My question is: How can I find what's the correct combination to use Google APIs (API 19) or Google APIs (API 17)?
Which Build tools version (I tried all in UI)?
Error:(9) Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'."
Error:Execution failed for task ':app:processDebugResources'.
com.android.ide.common.process.ProcessException: Failed to execute aapt
compileSdkVersion 'Google Inc.:Google APIs:19'
buildToolsVersion '19.1.0'
defaultConfig {
applicationId "com.example.cihan.myapplication"
minSdkVersion 10
targetSdkVersion 19
versionCode 5
versionName "5.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
Edit: I reinstalled Android Studio and selected the latest Google API version and build version (both versions are now 24)
Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'."
You need to compile the appcompat library
dependencies {
compile 'com.android.support:appcompat-v7:19+'
}
Note: I only used version 19+ because that seems to be what you want to compile with. That was released in 2014, so I'd recommend upgrading.
You can compile using the latest SDK and still run (most) your code on devices on API 19
See - Android Material Design | Maintaining Compatibility

Android No resource found that matches given name Error

I have set my app's min Sdk version to jelly bean. (created for kit kat)
after that this error occurred.
Android Studio : No resource found that matches the given name: attr 'android:actionModeShareDrawable'
how can I solve this ?
From Error
No resource found that matches the given name: attr 'android:actionModeShareDrawable'
The issue is about compling application with lower target.
AppCompat v21 builds themes that require the new APIs provided in API 21 (Android 5.0). To compile your application with AppCompat, you must also compile against API 21. The recommended setup for compiling/building with API 21 is a compileSdkVersion of 21 and a buildToolsVersion of 21.0.1 (which is the highest at this time - you always want to use the latest build tools).
Make sure the value for target (which tells the target android version) in project.properties file of both your project folder and appcompat_v7 folder is same
: inside 'your_project'/project.properties
target=android-21
android.library.reference.1=../appcompat_v7
and
: inside appcompat_v7/project.properties
target=android-21
android.library=true
and after this don't forget to clean your project .
Hope it helps!

Android support compat errors

My project worked fine last time.
Now I can't build this, I see a lot of problems in com.android.support/apcompat-v7/22.0.0/res/values-v21/values.xml
Error:(47, 21) No resource found that matches the given name: attr 'android:actionModeShareDrawable'.
I need to build my application for minSdkVersion 16 and targetVersion 16.
My project is compiling only if I set minSdkVersion, targetVersion and compilingVersion to 21.
I'm using Android Studio 1.2.2.
Please help me to fix this problem.
I see a lot of problems in com.android.support/apcompat-v7/22.0.0/res/values-v21/values.xml
Your compileSdkVersion should be 22, if you are going to use a 22.x.y version of a support library.
I need to build my application for minSdkVersion 16 and targetVersion 16.
Set minSdkVersion to 16, targetSdkVersion to 16, and compileSdkVersion to 22. Changing minSdkVersion nor targetSdkVersion values will not result in errors like the one that you cite.
To fix this problem you need to use:
compileSdkVersion 21
I didn't known before about:
compileSdkVersion - is the version of the API the app is compiled against. This means you can use Android API features included in that version of the API.
minSdkVersion - controls the lowest level you say your application can run on.
targetSdkVersion - ontrols any automatically applied backward compatibility features

Missing styles from android appcompat v7-21.0.0

I originally was using compile 'com.android.support:appcompat-v7:19.0.1', and I decided to implement a DrawerLayout. Unfortunately, I was informed that the v4 support library's ActionBarDrawerToggle is deprecated, and to use the v7 version. It appears that this isn't in the 19.0.1 version of support-v7-appcompat, so I decided to upgrade to compile 'com.android.support:appcompat-v7:21.0.0'. Now, however, I'm getting the following error in my styles:
Error:Error retrieving parent for item: No resource found that matches the given name '#style/Widget.AppCompat.Light.Base.ActionBar.TabBar.Inverse'.
(There are a few others).
I've tried a few things, including the following:
Error in styles_base.xml file - android app - No resource found that matches the given name 'android:Widget.Material.ActionButton'
Error retrieving parent for item: No resource found that matches the given name '#android:style/TextAppearance.Holo.Widget.ActionBar.Title'
My build.gradle has the following configuration:
defaultConfig {
minSdkVersion 11
targetSdkVersion 17
}
The v4 support library's ActionBarDrawerToggle was deprecated with the support library v21.
The v7 version was introduced with the appCompat library v21.
Also if you are using the appCompat library v21 you have to compile with API 21+.
Change your build.gradle file:
android {
compileSdkVersion 21
defaultConfig {
minSdkVersion 11
targetSdkVersion 21
}

Build errors with action bar, support library

I get many compilation errors when trying to add an ActionBar to my app. Any help is much appreciated!
I recently moved my application development from Eclipse to Android Studio. I'm an absolute novice wrt Android Studio and gradle. I want to add an ActionBar to my app. I want to support devices running at least API level 9. Per the Android developer doc, I see that I've got to use the V7 appcompat library. My SDK manager indicates that both Android Support Repository rev 11 and Android Support Library rev 21.0.3 have been installed. I've also read that my project should use both support-v4 as well as appcompat-v7 - is that right? The gradle file for my app module contains this:
defaultConfig {
applicationId "com.tomoreilly.solarisalpha"
minSdkVersion 9
targetSdkVersion 9
}
[...]
dependencies {
compile project(':androidLVL')
compile 'com.google.android.gms:play-services:+'
compile files('libs/acra-4.2.3.jar')
compile files('libs/htmllexer.jar')
compile "com.android.support:appcompat-v7:21.0.3"
compile 'com.android.support:support-v4:13.0.0'
}
Not sure what version numbers to use for the libraries. I specify appcompat-v7:21.0.3 because SDK manager indicates Android Support Library rev 21.0.3. But what about the version number for support-v4? I just got "13.0.0" from an example on the internet, because support-v4 doesn't seem to show in my SDK manager at all.
When I try to build my project I get many errors like these:
Error:(6, 21) No resource found that matches the given name: attr 'android:actionModeCopyDrawable'.
Error:(5, 21) No resource found that matches the given name: attr 'android:actionModeCutDrawable'.
Error:(7, 21) No resource found that matches the given name: attr 'android:actionModePasteDrawable'.
Error:(8, 21) No resource found that matches the given name: attr 'android:actionModeSelectAllDrawable'.
Error:(9, 21) No resource found that matches the given name: attr 'android:actionModeShareDrawable'.
Can someone see what I am missing or doing wrong?
Thanks!
Tom
appcompat-v7 automatically includes support-v4, so you can remove that line entirely.
Also make sure your compileSdkVersion in your build.gradle is set to 21 as well as per this question

Categories

Resources