add 'tools:replace=“Android:value”' to <meta-data> element at AndroidManifest

后端 未结 11 2108
温柔的废话
温柔的废话 2020-11-30 20:07

I\'m following a tutorial in HeadFirst Android development and encountered issues after adding: private ActionBarDrawerToggle drawerToggle;

The control was depre

相关标签:
11条回答
  • 2020-11-30 20:40
     <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>
    
    0 讨论(0)
  • 2020-11-30 20:43

    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'
    
    0 讨论(0)
  • 2020-11-30 20:52
    1. At Android Studio -> Open Manifest File
    2. Switch to Merged Manifest and check Other Manifest file.

    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

    0 讨论(0)
  • 2020-11-30 20:52

    add 'tools:replace="android:value"' to element at AndroidManifest.xml:22:5-24:34 to override. add to Line AndroidManifest.xml:22

    0 讨论(0)
  • 2020-11-30 20:56

    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
    
    0 讨论(0)
  • 2020-11-30 20:58

    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

    0 讨论(0)
提交回复
热议问题