Reputation: 767
I am beginner in android development so this might have simple solution that i am not aware of.
I have updated android studio to newer version (1.5.1) and i have some complications with building my project from older version. So first i run build and get stopper right here :
Warning:Conflict with dependency 'com.android.support:support-annotations'. Resolved versions for app (23.2.0) and test app (23.1.1) differ.
This is my gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "hidden"
minSdkVersion 8
targetSdkVersion 23
versionCode 1
versionName "1.0"
// tests
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile project(':library')
// tests
androidTestCompile 'com.android.support:support-annotations:23.1.1'
androidTestCompile 'com.android.support.test:runner:0.4'
androidTestCompile 'org.hamcrest:hamcrest-library:1.3'
}
The obvious solution is to rewrite version to 23.2.0
But then i rerun build and the real problem starts:
if file \res\values-v11\values-v11.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="MD_Dark" parent="Theme.AppCompat.Dialog.Alert">
<item name="android:windowMinWidthMajor">@dimen/abc_dialog_min_width_major</item>
<item name="android:windowMinWidthMinor">@dimen/abc_dialog_min_width_minor</item>
<item name="md_divider">@color/md_divider_white</item>
<item name="md_list_selector">@drawable/md_selector_dark</item>
<item name="md_btn_stacked_selector">@drawable/md_selector_dark</item>
<item name="md_btn_positive_selector">@drawable/md_btn_selector_dark</item>
<item name="md_btn_neutral_selector">@drawable/md_btn_selector_dark</item>
<item name="md_btn_negative_selector">@drawable/md_btn_selector_dark</item>
<item name="android:actionModeBackground">@color/primary_material_dark</item>
<item name="android:actionModeCloseDrawable">@drawable/abc_ic_ab_back_mtrl_am_alpha</item>
<item name="android:windowAnimationStyle">@style/MD_WindowAnimation</item>
<item name="android:backgroundDimEnabled">true</item>
</style>file continues...
following error:
Error:(15, 54) No resource found that matches the given name (at 'android:actionModeCloseDrawable' with value '@drawable/abc_ic_ab_back_mtrl_am_alpha').
Now i did my research and according to Update support library 23.2.0 build bug I should just rename the resource by its new file name but the file is generated and should not be changed and after rebuild it gets regenerated so i cant seem to fing a way out of this trouble.
Thanks for any help.
Upvotes: 0
Views: 777
Reputation: 767
Solution is to change this external library to newest version supporting changes in new support library v23.2.0
compile ('com.github.afollestad.material-dialogs:core:0.8.5.6@aar')
For some reason it has to be done manually.
Upvotes: 2
Reputation: 363677
You can resolve the warning using the 23.2.0.
androidTestCompile 'com.android.support:support-annotations:23.2.0'
About the issue.
Error:(15, 54) No resource found that matches the given name (at 'android:actionModeCloseDrawable' with value '@drawable/abc_ic_ab_back_mtrl_am_alpha').
You are referring a private resource.
As you can check in the google tracker a possible solution is
to try change the reference of abc_ic_ab_back_mtrl_am_alpha
to abc_ic_ab_back_material
in your style.
Upvotes: 1