gpt4 book ai didi

android - 保留 android.support.v4 后 android.support.v4 出现 nullPointerException

转载 作者:行者123 更新时间:2023-11-29 00:06:18 26 4
gpt4 key购买 nike

应用程序在没有 proguard 的情况下工作,即 minifyEnabled false,但在有 proguard 的情况下它会崩溃。我已经将 keep android.support.v4 添加到我的 proguard-rules.pro,所以我找不到我的代码的问题。

混淆规则

#Basic
-dontwarn android.support.v7.**
-keep class android.support.v7.** { *; }
-keep interface android.support.v7.** { *; }
-dontwarn android.support.v4.** { *; }
-keep class android.support.v4.** { *; }
-keep interface android.support.v4.** { *; }
-keepattributes *Annotation*
-useuniqueclassmembernames
-injars bin/classes
-injars libs
-outjars bin/classes-processed.jar

-dontpreverify
-repackageclasses ''
-allowaccessmodification
-optimizations !code/simplification/arithmetic
-keepattributes *Annotation*

-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider

-keep public class * extends android.view.View {
public <init>(android.content.Context);
public <init>(android.content.Context, android.util.AttributeSet);
public <init>(android.content.Context, android.util.AttributeSet, int);
public void set*(...);
}

-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet);
}

-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
}

-keepclassmembers class * extends android.content.Context {
public void *(android.view.View);
public void *(android.view.MenuItem);
}

-keepclassmembers class * implements android.os.Parcelable {
static android.os.Parcelable$Creator CREATOR;
}

-keepclassmembers class **.R$* {
public static <fields>;
}

#Get rid of logs
-assumenosideeffects class android.util.Log {
public static boolean isLoggable(java.lang.String, int);
public static int v(...);
public static int i(...);
public static int w(...);
public static int d(...);
public static int e(...);
}

###############
# Butterknife
-keep class butterknife.** { *; }
-dontwarn butterknife.internal.**
-keep class **$$ViewInjector { *; }

-keepclasseswithmembernames class * {
@butterknife.* <fields>;
}

-keepclasseswithmembernames class * {
@butterknife.* <methods>;
}

日志

11-06 15:08:59.643 5949-5956/? I/art: Debugger is no longer active
11-06 15:08:59.670 5949-5956/? W/art: Suspending all threads took: 26.870ms
11-06 15:09:00.092 5949-5949/? D/AndroidRuntime: Shutting down VM
11-06 15:09:00.101 5949-5949/? E/AndroidRuntime: FATAL EXCEPTION: main
11-06 15:09:00.101 5949-5949/? E/AndroidRuntime: Process: com.example, PID: 5949
11-06 15:09:00.101 5949-5949/? E/AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example/com.example.NavigationActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference
11-06 15:09:00.101 5949-5949/? E/AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2325)
11-06 15:09:00.101 5949-5949/? E/AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2390)
11-06 15:09:00.101 5949-5949/? E/AndroidRuntime: at android.app.ActivityThread.access$800(ActivityThread.java:151)
11-06 15:09:00.101 5949-5949/? E/AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
11-06 15:09:00.101 5949-5949/? E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
11-06 15:09:00.101 5949-5949/? E/AndroidRuntime: at android.os.Looper.loop(Looper.java:135)
11-06 15:09:00.101 5949-5949/? E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5257)
11-06 15:09:00.101 5949-5949/? E/AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
11-06 15:09:00.101 5949-5949/? E/AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:372)
11-06 15:09:00.101 5949-5949/? E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
11-06 15:09:00.101 5949-5949/? E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
11-06 15:09:00.101 5949-5949/? E/AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference
11-06 15:09:00.101 5949-5949/? E/AndroidRuntime: at com.example.InfoFragment.K(Unknown Source)
11-06 15:09:00.101 5949-5949/? E/AndroidRuntime: at com.example.InfoFragment.L(Unknown Source)
11-06 15:09:00.101 5949-5949/? E/AndroidRuntime: at com.example.InfoFragment.a(Unknown Source)
11-06 15:09:00.101 5949-5949/? E/AndroidRuntime: at android.support.v4.b.o.b(Unknown Source)
11-06 15:09:00.101 5949-5949/? E/AndroidRuntime: at android.support.v4.b.aa.a(Unknown Source)
11-06 15:09:00.101 5949-5949/? E/AndroidRuntime: at android.support.v4.b.aa.a(Unknown Source)
11-06 15:09:00.101 5949-5949/? E/AndroidRuntime: at android.support.v4.b.e.run(Unknown Source)
11-06 15:09:00.101 5949-5949/? E/AndroidRuntime: at android.support.v4.b.aa.e(Unknown Source)
11-06 15:09:00.101 5949-5949/? E/AndroidRuntime: at android.support.v4.b.w.o(Unknown Source)
11-06 15:09:00.101 5949-5949/? E/AndroidRuntime: at android.support.v4.b.r.onStart(Unknown Source)
11-06 15:09:00.101 5949-5949/? E/AndroidRuntime: at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1236)
11-06 15:09:00.101 5949-5949/? E/AndroidRuntime: at android.app.Activity.performStart(Activity.java:6006)
11-06 15:09:00.101 5949-5949/? E/AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2288)
11-06 15:09:00.101 5949-5949/? E/AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2390) 
11-06 15:09:00.101 5949-5949/? E/AndroidRuntime: at android.app.ActivityThread.access$800(ActivityThread.java:151) 
11-06 15:09:00.101 5949-5949/? E/AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303) 
11-06 15:09:00.101 5949-5949/? E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102) 
11-06 15:09:00.101 5949-5949/? E/AndroidRuntime: at android.os.Looper.loop(Looper.java:135) 
11-06 15:09:00.101 5949-5949/? E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5257) 
11-06 15:09:00.101 5949-5949/? E/AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 
11-06 15:09:00.101 5949-5949/? E/AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:372) 
11-06 15:09:00.101 5949-5949/? E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) 
11-06 15:09:00.101 5949-5949/? E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) 
11-06 15:14:00.243 5949-5949/? I/Process: Sending signal. PID: 5949 SIG: 9

没有混淆器:

Configuration on demand is an incubating feature.
WARNING [Project: :app] To shrink resources you must also enable ProGuard
:app:preBuild UP-TO-DATE
:app:preReleaseBuild UP-TO-DATE
:app:checkReleaseManifest
:app:preDebugBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE
:app:prepareComAndroidSupportCardviewV72301Library UP-TO-DATE
:app:prepareComAndroidSupportDesign2301Library UP-TO-DATE
:app:prepareComAndroidSupportRecyclerviewV72301Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42301Library UP-TO-DATE
:app:prepareReleaseDependencies
:app:compileReleaseAidl UP-TO-DATE
:app:compileReleaseRenderscript UP-TO-DATE
:app:generateReleaseBuildConfig UP-TO-DATE
:app:generateReleaseAssets UP-TO-DATE
:app:mergeReleaseAssets UP-TO-DATE
:app:generateReleaseResValues UP-TO-DATE
:app:generateReleaseResources UP-TO-DATE
:app:mergeReleaseResources UP-TO-DATE
:app:processReleaseManifest UP-TO-DATE
:app:processReleaseResources UP-TO-DATE
:app:generateReleaseSources UP-TO-DATE
:app:processReleaseJavaRes UP-TO-DATE
:app:compileReleaseJavaWithJavac UP-TO-DATE
:app:compileReleaseNdk UP-TO-DATE
:app:compileReleaseSources UP-TO-DATE
:app:preDexRelease UP-TO-DATE
:app:dexRelease UP-TO-DATE
:app:validateReleaseSigning
:app:packageRelease UP-TO-DATE
:app:zipalignRelease UP-TO-DATE
:app:assembleRelease UP-TO-DATE
:app:installRelease
Installing APK 'app-release.apk' on 'Nexus_5_API_22(AVD) - 5.1'
Installed on 1 device.

BUILD SUCCESSFUL

Total time: 8.116 secs
12:22:37 PM: External task execution finished 'installRelease'.

应用构建 gradle:

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.example"
minSdkVersion 15
targetSdkVersion 23
versionCode 2
versionName "1.0.1"
}
signingConfigs {
release
}
buildTypes {
release {
signingConfig signingConfigs.release
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude '.readme'
}
productFlavors {
}
}

def Properties props = new Properties()
def propFile = new File('signing.properties')
if(propFile.canRead()){
props.load(new FileInputStream(propFile))

if(props!=null && props.containsKey('STORE_FILE') && props.containsKey('STORE_PASSWORD') &&
props.containsKey('KEY_ALIAS') && props.containsKey('KEY_PASSWORD')){
android.signingConfigs.release.storeFile = file(props['STORE_FILE'])
android.signingConfigs.release.storePassword = props['STORE_PASSWORD']
android.signingConfigs.release.keyAlias = props['KEY_ALIAS']
android.signingConfigs.release.keyPassword = props['KEY_PASSWORD']
} else {
println 'signing.properties found but some entries are missing'
android.buildTypes.release.signingConfig = null
}
} else {
println 'signing.properties not found'
android.buildTypes.release.signingConfig = null
}

repositories{
mavenCentral()
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:design:23.0.1'
compile 'com.android.support:cardview-v7:23.0.1'
compile 'com.android.support:recyclerview-v7:23.0.1'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.google.code.gson:gson:2.3'
compile 'com.mcxiaoke.volley:library:1.0.19'
}

新的 Gradle 控制台输出:

Configuration on demand is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preReleaseBuild UP-TO-DATE
:app:checkReleaseManifest
:app:preDebugBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE
:app:prepareComAndroidSupportCardviewV72301Library UP-TO-DATE
:app:prepareComAndroidSupportDesign2301Library UP-TO-DATE
:app:prepareComAndroidSupportRecyclerviewV72301Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42301Library UP-TO-DATE
:app:prepareReleaseDependencies
:app:compileReleaseAidl UP-TO-DATE
:app:compileReleaseRenderscript UP-TO-DATE
:app:generateReleaseBuildConfig UP-TO-DATE
:app:generateReleaseAssets UP-TO-DATE
:app:mergeReleaseAssets UP-TO-DATE
:app:generateReleaseResValues UP-TO-DATE
:app:generateReleaseResources UP-TO-DATE
:app:mergeReleaseResources UP-TO-DATE
:app:processReleaseManifest UP-TO-DATE
:app:processReleaseResources UP-TO-DATE
:app:generateReleaseSources UP-TO-DATE
:app:processReleaseJavaRes UP-TO-DATE
:app:compileReleaseJavaWithJavac UP-TO-DATE
:app:compileReleaseNdk UP-TO-DATE
:app:compileReleaseSources UP-TO-DATE
:app:proguardRelease
Exception while processing task
java.io.IOException: Can't read [D:directoryToApp\app\bin\classes] (No such file or directory)
at proguard.InputReader.readInput(InputReader.java:188)
at proguard.InputReader.readInput(InputReader.java:158)
at proguard.InputReader.readInput(InputReader.java:136)
at proguard.InputReader.execute(InputReader.java:66)
at proguard.ProGuard.readInput(ProGuard.java:218)
at proguard.ProGuard.execute(ProGuard.java:82)
at proguard.gradle.ProGuardTask.proguard(ProGuardTask.java:1074)
at com.android.build.gradle.tasks.AndroidProGuardTask.doMinification(AndroidProGuardTask.java:139)
at com.android.build.gradle.tasks.AndroidProGuardTask$1.run(AndroidProGuardTask.java:115)
at com.android.builder.tasks.Job.runTask(Job.java:48)
at com.android.build.gradle.tasks.SimpleWorkQueue$EmptyThreadContext.runTask(SimpleWorkQueue.java:41)
at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:227)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: No such file or directory
at proguard.io.DirectoryPump.pumpDataEntries(DirectoryPump.java:50)
at proguard.InputReader.readInput(InputReader.java:184)
... 12 more
:app:dexRelease UP-TO-DATE
:app:shrinkReleaseResources UP-TO-DATE
:app:validateReleaseSigning
:app:packageRelease UP-TO-DATE
:app:zipalignRelease UP-TO-DATE
:app:assembleRelease UP-TO-DATE

BUILD SUCCESSFUL

最佳答案

尝试:

# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in D:/program/studio/sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the ProGuard
# include property in project.properties.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}


-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-ignorewarnings
-verbose
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*

-keepattributes *Annotation*
-keepattributes Signature
-keepattributes SourceFile,LineNumberTable


#-libraryjars libs/asmack-android-19-0.8.10.jar
#-libraryjars libs/android-support-v4.jar

# 保持 native 方法不被混淆
-keepclasseswithmembernames class * {
native <methods>;
}

# 保持自定义控件类不被混淆
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet);
}
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
}

-keepclasseswithmembers class * {
void onClick*(...);
}
-keepclasseswithmembers class * {
*** *Callback(...);
}

# keep setters in Views so that animations can still work.
# see http://proguard.sourceforge.net/manual/examples.html#beans
-keepclassmembers public class * extends android.view.View {
void set*(***);
*** get*();
}

# 保持自定义控件类不被混淆
-keepclassmembers class * extends android.app.Activity {
public void *(android.view.View);
}

# 保持枚举 enum 类不被混淆
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}

# 保持 Parcelable 不被混淆
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
-keep class * implements android.os.Serializable {
public static final android.os.Serializable$Creator *;
}
-keepclassmembers class **.R$* {
public static <fields>;
}

# http client
-keep class org.apache.http.** {*; }
-keep class org.apache.**{*;}

# umeng message anysl
# 以下类过滤不混淆
-keep public class * extends com.umeng.**
# 以下包不进行过滤
-keep class com.umeng.** { *; }
-keepclassmembers class * {
public <init>(org.json.JSONObject);
}

-keep,allowshrinking class org.android.agoo.service.* {
public <fields>;
public <methods>;
}
-keep,allowshrinking class com.umeng.message.* {
public <fields>;
public <methods>;
}

-keep public class com.airi.buyue.R$*{
public static final int *;
}

-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
-keep public class com.umeng.fb.ui.ThreadView {
}
#是 universalimageloader
-dontwarn com.nostra13.universalimageloader.**

-keep class com.nostra13.universalimageloader.** {
*;
}

# v4 包的混淆

#-libraryjars ./libs/android-support-v4.jar

#-dontwarn android.support.**

-dontwarn android.support.v4.**

-dontwarn **CompatHoneycomb

-dontwarn **CompatHoneycombMR2

-dontwarn **CompatCreatorHoneycombMR2

-keep interface android.support.v4.app.** { *; }

-keep class android.support.v4.** { *; }

-keep public class * extends android.support.v4.**

-keep public class * extends android.app.Fragment
#alipay
-keep class com.alipay.android.app.**{*;}

-keepattributes Signature

-keepattributes *Annotation*

#-libraryjars src/main/ormlite-android-4.48.jar
#-libraryjars src/main/ormlite-core-4.48.jar

-dontwarn com.j256.**

-keep class com.j256.** { *; }
-keep class com.j256.ormlite.** { *; }

-keep public class * extends com.j256.ormlite.android.apptools.OrmLiteSqliteOpenHelper
-keep public class * extends com.j256.ormlite.android.apptools.OpenHelperManager
-keep public class * extends com.j256.ormlite.dao
-dontwarn com.j256.ormlite.android.**
-dontwarn com.j256.ormlite.dao.**
-dontwarn com.j256.ormlite.db.**
-dontwarn com.j256.ormlite.field.**
-dontwarn com.j256.ormlite.logger.**
-dontwarn com.j256.ormlite.misc.**
-dontwarn com.j256.ormlite.stmt.**
-dontwarn com.j256.ormlite.support.**
-dontwarn com.j256.ormlite.table.**
-dontwarn com.j256.ormlite.**
-dontwarn com.j256.ormlite.android.**
-dontwarn com.j256.ormlite.field.**
-dontwarn com.j256.ormlite.stmt.**

-keep class com.j256.ormlite.** { *; }
-keep class com.j256.ormlite.android.** { *; }
-keep class com.j256.ormlite.field.** { *; }
-keep class com.j256.ormlite.dao.** { *; }
-keep class com.j256.ormlite.db.** { *; }
-keep class com.j256.ormlite.stmt.** { *; }

#无法保存 bean
-keep class com.ishow.funnymap.bean.** { *; }
#保护<init>(Context context) 不被混淆
-keepclasseswithmembers class * {
public <init>(android.content.Context);
}

#个推
-dontwarn com.igexin.**
-keep class com.igexin.**{*;}

#ACRA specifics
# we need line numbers in our stack traces otherwise they are pretty useless
-renamesourcefileattribute SourceFile
-keepattributes SourceFile,LineNumberTable

# ACRA needs "annotations" so add this...
#-keepattributes *Annotation*

# volley
-dontwarn com.android.volley.jar.**
-keep class com.android.volley.**{*;}


-keepattributes *Annotation*
-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class * extends android.app.backup.BackupAgent
-keep public class * extends android.preference.Preference
-keep public class * extends android.support.v4.app.Fragment
-keep public class * extends android.app.Fragment
-keep public class com.android.vending.licensing.ILicensingService
-keep class com.itheima.mobilesafe.engine.AppInfoProvider
-keep class net.youmi.android.** {
*;
}

-keep class com.airi.buyue.data.**{*;}
-keep class com.airi.buyue.table.**{*;}
-dontshrink
-dontoptimize
-dontwarn com.google.android.maps.**
-dontwarn android.webkit.WebView
-dontwarn com.umeng.**
-dontwarn com.tencent.weibo.sdk.**
-dontwarn com.facebook.**
#-libraryjars src/main/SocialSDK_QQZone_2.jar
-keep enum com.facebook.**
-keepattributes Exceptions,InnerClasses,Signature
-keepattributes *Annotation*
-keepattributes SourceFile,LineNumberTable
-keep public interface com.facebook.**
-keep public interface com.tencent.**
-keep public interface com.umeng.socialize.**
-keep public interface com.umeng.socialize.sensor.**
-keep public interface com.umeng.scrshot.**
-keep public class com.umeng.socialize.* {*;}
-keep public class javax.**
-keep public class android.webkit.**
-keep class com.facebook.**
-keep class com.umeng.scrshot.**
-keep public class com.tencent.** {*;}
-keep class com.umeng.socialize.sensor.**
-keep class com.tencent.mm.sdk.modelmsg.WXMediaMessage {*;}
-keep class com.tencent.mm.sdk.modelmsg.** implements com.tencent.mm.sdk.modelmsg.WXMediaMessage$IMediaObject {*;}
-keep class im.yixin.sdk.api.YXMessage {*;}
-keep class im.yixin.sdk.api.** implements im.yixin.sdk.api.YXMessage$YXMessageData{*;}
-keep public class com.airi.buyue.R$*{
public static final int *;
}

-keep class com.baidu.mapapi.** {*;}

#-libraryjars src/main/libs/locSDK_5.0.jar
-keep class com.baidu.** { *; }
-keep class vi.com.gdi.bgl.android.**{*;}

-keepclasseswithmembernames class * {
native <methods>;
}

-dontshrink
-dontoptimize
-dontwarn com.google.android.maps.**
-dontwarn android.webkit.WebView
-dontwarn com.umeng.**
-dontwarn com.tencent.weibo.sdk.**
-dontwarn com.facebook.**

#-libraryjars src/main/libs/SocialSDK_QQZone_2.jar

-keep enum com.facebook.**
-keepattributes Exceptions,InnerClasses,Signature
-keepattributes *Annotation*
-keepattributes SourceFile,LineNumberTable

-keep public interface com.facebook.**
-keep public interface com.tencent.**
-keep public interface com.umeng.socialize.**
-keep public interface com.umeng.socialize.sensor.**
-keep public interface com.umeng.scrshot.**

-keep public class com.umeng.socialize.* {*;}
-keep public class javax.**
-keep public class android.webkit.**

-keep class com.facebook.**
-keep class com.umeng.scrshot.**
-keep public class com.tencent.** {*;}
-keep class com.umeng.socialize.sensor.**

-keep class com.tencent.mm.sdk.modelmsg.WXMediaMessage {*;}

-keep class com.tencent.mm.sdk.modelmsg.** implements com.tencent.mm.sdk.modelmsg.WXMediaMessage$IMediaObject {*;}

-keep class im.yixin.sdk.api.YXMessage {*;}
-keep class im.yixin.sdk.api.** implements im.yixin.sdk.api.YXMessage$YXMessageData{*;}

-keep public class com.airi.buyue.R$*{
public static final int *;
}

-keep,allowshrinking class org.android.agoo.service.* {
public <fields>;
public <methods>;
}

-keep,allowshrinking class com.umeng.message.* {
public <fields>;
public <methods>;
}

-keep public class com.airi.buyue.R$*{
public static final int *;
}

-keep class com.airi.buyue.Card{*;}
-keep class com.airi.buyue.UserCard{*;}
-keep class com.airi.buyue.GuideCard{*;}
-keep class com.airi.buyue.User{*;}
-keep class com.airi.buyue.table.Event{*;}
-keep class com.airi.buyue.table.Sync{*;}
-keep class com.airi.buyue.table.Board{*;}
-keep class com.airi.buyue.table.Ntf{*;}

#-libraryjars src/main/libs/com.umeng.message.lib.jar
#-libraryjars src/main/libs/httpmime-4.1.3.jar
#-libraryjars src/main/libs/locSDK_5.0.jar
#-libraryjars src/main/libs/ormlite-android-4.48.jar
#-libraryjars src/main/libs/ormlite-core-4.48.jar
#-libraryjars src/main/libs/SocialSDK_QQZone_1.jar
#-libraryjars src/main/libs/SocialSDK_QQZone_2.jar
#-libraryjars src/main/libs/SocialSDK_QQZone_3.jar
#-libraryjars src/main/libs/SocialSDK_Sina.jar
#-libraryjars src/main/libs/SocialSDK_UserCenter.jar
#-libraryjars src/main/libs/SocialSDK_WeiXin_1.jar
#-libraryjars src/main/libs/SocialSDK_WeiXin_2.jar
#-libraryjars src/main/libs/umeng-update-v2.4.2.jar
#-libraryjars src/main/libs/umeng_social_sdk.jar

#-libraryjars /libs/android-support-v4.jar -dontwarn android.support.v4.**
#amap
-keep class android.support.v4.** {*;}
-keep public class * extends android.support.v4.**
-keep public class * extends android.app.Fragment
-keep class com.amap.api.** {*;}
-keep class com.autonavi.** {*;}
-keep class com.a.a.** {*;}

-keep class com.amp.apis.lib.**{*;}
-keep class com.squareup.picasso.**{*;}

##-libraryjars libs/android-support-v4.jar
#-dontwarn android.support.v4.**
#-keep class android.support.v4.** { *; }
#-keep interface android.support.v4.app.** { *; }
#-keep public class * extends android.support.v4.**
#-keep public class * extends android.app.Fragment
#
##-libraryjars libs/MapApiLocation.jar
##-libraryjars libs/MapApiSearch.jar
##-libraryjars libs/Android_Map_V2.0.4.jar
#
#-dontwarn com.amap.api.**
#-dontwarn com.a.a.**
#-dontwarn com.autonavi.**
#
#-keep class com.amap.api.** {*;}
#-keep class com.autonavi.** {*;}
#-keep class com.a.a.** {*;}


-dontwarn android.support.v4.**
-keep class android.support.v4.** { *; }
-keep interface android.support.v4.app.** { *; }
-keep public class * extends android.support.v4.**
-keep public class * extends android.app.Fragment
-dontwarn com.amap.api.**
-dontwarn com.a.a.**
-dontwarn com.autonavi.**
-keep class com.amap.api.** {*;}
-keep class com.autonavi.** {*;}
-keep class com.a.a.** {*;}

-keep class com.amap.api.mapcore.**{*;}
-keep class com.amap.api.maps.**{*;}
-keep class com.autonavi.amap.mapcore.*{*;}
-keep class com.amap.api.location.**{*;}
-keep class com.aps.**{*;}
-keep class com.amap.api.services.**{*;}

#//umeng mssg
-keep class com.umeng.message.* {
public <fields>;
public <methods>;
}

-keep class com.umeng.message.protobuffer.MessageResponse$PushResponse$Info {
public <fields>;
public <methods>;
}

-keep class com.umeng.message.protobuffer.MessageResponse$PushResponse$Info$Builder {
public <fields>;
public <methods>;
}

-keep class org.android.agoo.impl.*{
public <fields>;
public <methods>;
}

-keep class org.android.agoo.service.* {*;}

-keep class org.android.spdy.**{*;}

-keep public class com.airi.buyue.R$*{
public static final int *;
}
-keep class org.springframework.**

-dontwarn butterknife.internal.**
-keep class **$$ViewInjector { *; }
-keepnames class * { @butterknife.InjectView *;}

关于android - 保留 android.support.v4 后 android.support.v4 出现 nullPointerException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33570009/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com