Jco*_*cov 3 sdk android facebook manifest gradle
错误:任务':app:processDebugManifest'的执行失败.清单合并失败:来自[com.android.support:cardview-v7:25.3.1]的属性meta-data#android.support.VERSION@value value =(25.3.1)AndroidManifest.xml:24:9-31也是出现在[com.android.support:appcompat-v7:26.0.0-alpha1] AndroidManifest.xml:27:9-38 value =(26.0.0-alpha1).建议:在AndroidManifest.xml:22:5-24:34中添加'tools:replace ="android:value"'来覆盖.
我正在尝试使用目标SDK为26的应用程序.该应用程序需要Facebook SDK(最新根据Facebook SDK版本 4.25.0.
Volley是版本1.0.0(Android Volley Dev Page)
我只能从错误猜测这些SDK中的一些共享库但是一个加载不同的版本到另一个...所以我需要添加某种形式的"加载这个而不是这个"像我的Gradle文件中的命令?或者我只是遗漏了什么?
我的Gradle Build文件如下所示出现上述错误.
Project Gradle Build:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Run Code Online (Sandbox Code Playgroud)
应用程序gradle构建:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.example.johnny.fibre"
minSdkVersion 18
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.facebook.android:facebook-android-sdk:4.25.0'
compile 'com.android.support:appcompat-v7:26.+'
//compile "com.android.support:support-core-utils:25.+"
compile 'com.android.volley:volley:1.0.0'
//compile 'com.android.support:support-v4:26.0.0'
testCompile 'junit:junit:4.12'
}
Run Code Online (Sandbox Code Playgroud)
我的AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.johnny.fibre">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.AppCompat.DayNight.NoActionBar">
<uses-permission android:name="android.permission.INTERNET"/>
<activity android:name=".Home">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data android:name="com.facebook.sdk.ApplicationId"
android:value="@string/facebook_app_id"/>
<activity android:name="com.facebook.FacebookActivity"
android:configChanges=
"keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="@string/app_name" />
<activity
android:name="com.facebook.CustomTabActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="@string/fb_login_protocol_scheme" />
</intent-filter>
</activity>
</application>
</manifest>
Run Code Online (Sandbox Code Playgroud)
感谢您的任何帮助!我一直在评论和更改SDK版本和所有种类......
我通过进一步的论坛浏览解决了这个问题
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
//androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
// exclude group: 'com.android.support', module: 'support-annotations'
//})
compile 'com.android.support:cardview-v7:26.0.0-alpha1'
compile 'com.android.support:customtabs:26.0.0-alpha1'
compile 'com.android.support:appcompat-v7:26.0.0-alpha1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
}
Run Code Online (Sandbox Code Playgroud)
依赖关系
com.android.support:cardview-v7:26.0.0-alpha1
compile 'com.android.support:customtabs:26.0.0-alpha1'
Run Code Online (Sandbox Code Playgroud)
被添加似乎解决了这个问题.
| 归档时间: |
|
| 查看次数: |
5169 次 |
| 最近记录: |