我更新的SDK版本26後,我試圖建立一個APK,但得到這個錯誤:Android SDK中26生成錯誤
Error:Execution failed for task ':app:transformClassesWithFirebasePerformancePluginForFacebookDebug'.
> android/support/v7/app/ActionBarActivity
陪着SDK版本25是不錯,但遇到錯誤消息的build.gradle說:
all com.android.support libraries must use the exact same version
相關報告(如果失敗):
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
:app:transformClassesWithFirebasePerformancePluginForFacebookDebug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformClassesWithFirebasePerformancePluginForFacebookDebug'.
> android/support/v7/app/ActionBarActivity
更新1: 我發現根本原因但仍然需要一些建議。我看着依賴關係報告。支持庫26.1.0是從另一個庫
+--- com.onesignal:OneSignal:3.6.2
| +--- com.google.android.gms:play-services-gcm:[10.2.1,11.3.0) -> 11.2.2
| | +--- com.google.android.gms:play-services-base:11.2.2 (*)
| | +--- com.google.android.gms:play-services-basement:11.2.2 (*)
| | \--- com.google.android.gms:play-services-iid:11.2.2
| | +--- com.google.android.gms:play-services-base:11.2.2 (*)
| | \--- com.google.android.gms:play-services-basement:11.2.2 (*)
| +--- com.google.android.gms:play-services-location:[10.2.1,11.3.0) -> 11.2.2
| | +--- com.google.android.gms:play-services-base:11.2.2 (*)
| | +--- com.google.android.gms:play-services-basement:11.2.2 (*)
| | \--- com.google.android.gms:play-services-tasks:11.2.2 (*)
| +--- com.android.support:support-v4:[26.0.0,26.2.0) -> 26.1.0 (*)
| \--- com.android.support:customtabs:[26.0.0,26.2.0) -> 26.1.0 (*)
\---
更新2: 我已經設置了Facebook SDK用法如下:
compile('com.facebook.android:facebook-android-sdk:4.26.0') {
exclude group: 'com.android.support', module: 'appcompat-v7'
}
,但仍得到相同的錯誤
所以如何我能解決這個衝突嗎?
添加您的build.gradle。你的一些依賴鏈接到舊的支持庫 – DeKaNszn
@DeKaNszn添加 –
你能添加'./gradlew app:dependencies --configuration releaseCompileClasspath'的輸出嗎? – DeKaNszn