gradle 使用 TextInputLayout 时出错
gradle error when use TextInputLayout
我正在尝试使用 TextInputLayout
,但我收到 Manifest merge failed。这会导致 gradle 错误。以下文本显示 gradle 消息:
Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute meta-data#android.support.VERSION@value value=(25.3.1) from [com.android.support:design:25.3.1] AndroidManifest.xml:27:9-31
is also present at [com.android.support:appcompat-v7:26.0.0-alpha1] AndroidManifest.xml:27:9-38 value=(26.0.0-alpha1).
Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:25:5-27:34 to override.
项目 minSdkVersion is 19
、targetSdkVersion is 26
和 compileSdkVersion is 26
具有 buildToolsVersion 25.0.2
和 gradle 依赖项的项目是:
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:appcompat-v7:26.0.0-alpha1'
确保两个版本相同:
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:appcompat-v7:25.3.1'
或
compile 'com.android.support:design:26.0.0-alpha1'
compile 'com.android.support:appcompat-v7:26.0.0-alpha1'
我建议您使用稳定版本的 SDK,因为当您尝试较新的版本并且它处于 alpha 或 beta 版本时会有一些错误,可能是您的情况:[com.android.support:appcompat- v7:26.0.0- Alpha1]
尝试使用 SKD 25 版本。
编译'com.android.support:design:25.3.1'
编译'com.android.support:appcompat-v7:25.3.1'
我正在尝试使用 TextInputLayout
,但我收到 Manifest merge failed。这会导致 gradle 错误。以下文本显示 gradle 消息:
Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute meta-data#android.support.VERSION@value value=(25.3.1) from [com.android.support:design:25.3.1] AndroidManifest.xml:27:9-31
is also present at [com.android.support:appcompat-v7:26.0.0-alpha1] AndroidManifest.xml:27:9-38 value=(26.0.0-alpha1).
Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:25:5-27:34 to override.
项目 minSdkVersion is 19
、targetSdkVersion is 26
和 compileSdkVersion is 26
具有 buildToolsVersion 25.0.2
和 gradle 依赖项的项目是:
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:appcompat-v7:26.0.0-alpha1'
确保两个版本相同:
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:appcompat-v7:25.3.1'
或
compile 'com.android.support:design:26.0.0-alpha1'
compile 'com.android.support:appcompat-v7:26.0.0-alpha1'
我建议您使用稳定版本的 SDK,因为当您尝试较新的版本并且它处于 alpha 或 beta 版本时会有一些错误,可能是您的情况:[com.android.support:appcompat- v7:26.0.0- Alpha1]
尝试使用 SKD 25 版本。
编译'com.android.support:design:25.3.1'
编译'com.android.support:appcompat-v7:25.3.1'