我可以将Facebook Core 4/27与Android构建工具23一起使用吗?

时间:2017-10-14 19:00:37

标签: android facebook proguard

我不得不在版本procedure TForm1.FormMouseWheel(Sender: TObject; Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean); begin self.VertScrollBar.Position := self.VertScrollBar.Position + WheelDelta; end; 中使用带有com.android.support库的Android构建工具23。我必须在项目中添加Facebook Core,在ProGuard发挥作用之前一切都很好。

我在构建期间遇到此错误:

23.0.4

有没有什么方法可以让Facebook Core在我的应用程序上运行而不会改变我的支持库版本?

1 个答案:

答案 0 :(得分:0)

以防万一你和我一样。 对于版本4.27,这是一个可以应用于使用Android 23构建它的补丁。

diff --git build.gradle build.gradle
index e5c5761..9d298cb 100644
--- build.gradle
+++ build.gradle
@@ -5,7 +5,7 @@ buildscript {
         mavenCentral()
     }
     dependencies {
-        classpath 'com.android.tools.build:gradle:2.3.3'
+        classpath 'com.android.tools.build:gradle:2.2.0'
     }
 }

diff --git constants.gradle constants.gradle
index 2b95ec8..94e35bb 100644
--- constants.gradle
+++ constants.gradle
@@ -1,7 +1,7 @@
 project.ext {
-    buildTools = "25.0.3"
-    supportLibraryVersion = "25.3.1"
-    compileSdk = 25
+    buildTools = "23.0.3"
+    supportLibraryVersion = "23.4.0"
+    compileSdk = 23
     minSdk = 15
-    targetSdk = 25
-}
\ No newline at end of file
+    targetSdk = 23
+}
diff --git facebook-core/build.gradle facebook-core/build.gradle
index 7f967b3..274f43f 100644
--- facebook-core/build.gradle
+++ facebook-core/build.gradle
@@ -10,20 +10,19 @@ project.ext.url = 'https://github.com/facebook/facebook-android-sdk/facebook-cor
 dependencies {
     // Facebook Dependencies
     compile 'com.parse.bolts:bolts-android:1.4.0'
-    compile 'com.android.support:support-annotations:25.3.1'
-    compile 'com.android.support:support-core-utils:25.3.1'
+    compile 'com.android.support:support-v4:23.4.0'

     // Unit Tests
     testCompile 'junit:junit:4.12'
 }

 android {
-    compileSdkVersion Integer.parseInt(project.ANDROID_BUILD_SDK_VERSION)
-    buildToolsVersion project.ANDROID_BUILD_TOOLS_VERSION
+    compileSdkVersion 23
+    buildToolsVersion "23.0.3"

     defaultConfig {
         minSdkVersion Integer.parseInt(project.ANDROID_BUILD_MIN_SDK_VERSION)
-        targetSdkVersion Integer.parseInt(project.ANDROID_BUILD_TARGET_SDK_VERSION)
+        targetSdkVersion 23
         consumerProguardFiles 'proguard-rules.pro'
     }

diff --git gradle.properties gradle.properties
index 48ed711..60f3cd7 100644
--- gradle.properties
+++ gradle.properties
@@ -1,5 +1,5 @@
 ANDROID_BUILD_MIN_SDK_VERSION=15
-ANDROID_BUILD_TARGET_SDK_VERSION=25
-ANDROID_BUILD_TOOLS_VERSION=25.0.3
-ANDROID_BUILD_SDK_VERSION=25
-org.gradle.jvmargs=-Xmx1536M
\ No newline at end of file
+ANDROID_BUILD_TARGET_SDK_VERSION=23
+ANDROID_BUILD_TOOLS_VERSION=23.0.3
+ANDROID_BUILD_SDK_VERSION=23
+org.gradle.jvmargs=-Xmx1536M

这是令人讨厌的,当然,如果你只需要分析,那就足够了:/