Browse Source

dex超载处理

Arisono 9 years ago
parent
commit
50efdff6a0

+ 7 - 5
WeiChat/build.gradle

@@ -19,6 +19,7 @@ android {
             sourceCompatibility JavaVersion.VERSION_1_7
             targetCompatibility JavaVersion.VERSION_1_7
         }
+        multiDexEnabled true
     }
     packagingOptions {
         exclude 'META-INF/LICENSE.txt'
@@ -38,12 +39,12 @@ android {
 
 
 dependencies {
+
     compile project(':pullToRefershLibraryMy')
     compile project(':materialdialogs')
     compile project(':MPAndroidChart')
     compile project(':libedittextformlibrary')
     compile project(':libfloatingactionbutton')
-    compile project(':libpsectionlistview')
     compile project(':libbdupdatesdk')
     compile files('libs/android-async-http-1.4.5.jar')
     compile files('libs/asmack.jar')
@@ -61,11 +62,12 @@ dependencies {
     compile files('libs/pushservice-4.5.5.77.jar')
     compile files('libs/xutils.jar')
     compile files('libs/flexjson-2.1.jar')
-    compile 'com.android.support:support-v4:22.2.1'
-    compile 'com.android.support:appcompat-v7:22.2.1'
+    compile 'com.android.support:support-v4:22.2.0'
+    compile 'com.android.support:appcompat-v7:22.2.0'
+    compile 'com.android.support:cardview-v7:22.2.0'
+    compile 'com.android.support:design:22.2.0'
     compile 'com.commit451:PhotoView:1.2.5'
     compile 'me.gujun.android.taggroup:library:1.4@aar'
     compile 'com.umeng.analytics:analytics:latest.integration'
-    compile 'com.android.support:cardview-v7:22.2.1'
-    compile 'com.android.support:design:22.2.1'
+    compile 'com.android.support:multidex:1.0.1'
 }

+ 9 - 0
WeiChat/src/main/java/com/xzjmyk/pm/activity/MyApplication.java

@@ -1,12 +1,14 @@
 package com.xzjmyk.pm.activity;
 
 import android.app.Application;
+import android.content.Context;
 import android.graphics.Bitmap;
 import android.graphics.Bitmap.Config;
 import android.os.Build;
 import android.os.Environment;
 import android.os.Handler;
 import android.os.StrictMode;
+import android.support.multidex.MultiDex;
 import android.util.Log;
 
 import com.baidu.mapapi.SDKInitializer;
@@ -272,6 +274,13 @@ public class MyApplication extends Application {
         }
     }
 
+
+    @Override
+    protected void attachBaseContext(Context base) {
+        super.attachBaseContext(base);
+        MultiDex.install(this);
+    }
+
     /***********************
      * 保存当前登陆用户的全局信息
      ***************/

+ 1 - 1
settings.gradle

@@ -1,2 +1,2 @@
-include ':pullToRefershLibraryMy', ':materialdialogs', ':MPAndroidChart', ':libedittextformlibrary', ':libfloatingactionbutton', ':librarymenudrawer', ':libpsectionlistview', ':libbdupdatesdk'
+include ':pullToRefershLibraryMy', ':materialdialogs', ':MPAndroidChart', ':libedittextformlibrary', ':libfloatingactionbutton', ':libbdupdatesdk'
 include ':WeiChat'