I\'m following a tutorial in HeadFirst Android development and encountered issues after adding: private ActionBarDrawerToggle drawerToggle;
The control was depre
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:largeHeap="true"
android:supportsRtl="true"
android:theme="@style/AppTheme"
>
<meta-data
tools:replace="android:value"
android:name="android.support.VERSION"
android:value="26.0.0" />
</application>
Open Android Studio -> Open Manifest File
Add <uses-sdk tools:overrideLibrary="android.support.v17.leanback"/>
. Don't forget to include xmlns:tools="http://schemas.android.com/tools"
too, before the <application>
tag
replace
compile 'com.android.support:recyclerview-v7:+'
by
compile 'com.android.support:recyclerview-v7:25.3.1'
and add
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
In my case I am using 26.1.0 support files but found support-v13 is 26.0.1
So I added implementation 'com.android.support:support-v13:26.1.0'
to Gradle file and problem solved
add 'tools:replace="android:value"' to element at AndroidManifest.xml:22:5-24:34 to override. add to Line AndroidManifest.xml:22
Changed all support library versions to 25.3.1 and worked like a charm:
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
You also need to change the following parameters to 25:
compileSdkVersion 25
targetSdkVersion 25
This code resolved my problem
"Problem is that all support libraries with same version and major version has to match compile SDK version.
So try to force a specific support library version. Put this at the end of your app module in build.gradle."
thanks