- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
应用程序在没有 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/
我最近在/ drawable中添加了一些.gifs,以便可以将它们与按钮一起使用。这个工作正常(没有错误)。现在,当我重建/运行我的应用程序时,出现以下错误: Error: Gradle: Execu
Android 中有返回内部存储数据路径的方法吗? 我有 2 部 Android 智能手机(Samsung s2 和 s7 edge),我在其中安装了一个应用程序。我想使用位于这条路径中的 sqlit
这个问题在这里已经有了答案: What's the difference between "?android:" and "@android:" in an android layout xml f
我只想知道 android 开发手机、android 普通手机和 android root 手机之间的实际区别。 我们不能从实体店或除 android marketplace 以外的其他地方购买开发手
自Gradle更新以来,我正在努力使这个项目达到标准。这是一个团队项目,它使用的是android-apt插件。我已经进行了必要的语法更改(编译->实现和apt->注释处理器),但是编译器仍在告诉我存在
我是android和kotlin的新手,所以请原谅要解决的一个非常简单的问题! 我已经使用导航体系结构组件创建了一个基本应用程序,使用了底部的导航栏和三个导航选项。每个导航选项都指向一个专用片段,该片
我目前正在使用 Facebook official SDK for Android . 我现在正在使用高级示例应用程序,但我不知道如何让它获取应用程序墙/流/状态而不是登录的用户。 这可能吗?在那种情
我在下载文件时遇到问题, 我可以在模拟器中下载文件,但无法在手机上使用。我已经定义了上网和写入 SD 卡的权限。 我在服务器上有一个 doc 文件,如果用户单击下载。它下载文件。这在模拟器中工作正常但
这个问题在这里已经有了答案: What is the difference between gravity and layout_gravity in Android? (22 个答案) 关闭 9
任何人都可以告诉我什么是 android 缓存和应用程序缓存,因为当我们谈论缓存清理应用程序时,它的作用是,缓存清理概念是清理应用程序缓存还是像内存管理一样主存储、RAM、缓存是不同的并且据我所知,缓
假设应用程序 Foo 和 Eggs 在同一台 Android 设备上。任一应用程序都可以获取设备上所有应用程序的列表。一个应用程序是否有可能知道另一个应用程序是否已经运行以及运行了多长时间? 最佳答案
我有点困惑,我只看到了从 android 到 pc 或者从 android 到 pc 的例子。我需要制作一个从两部手机 (android) 连接的 android 应用程序进行视频聊天。我在想,我知道
用于使用 Android 以编程方式锁定屏幕。我从 Stackoverflow 之前关于此的问题中得到了一些好主意,并且我做得很好,但是当我运行该代码时,没有异常和错误。而且,屏幕没有锁定。请在这段代
文档说: android:layout_alignParentStart If true, makes the start edge of this view match the start edge
我不知道这两个属性和高度之间的区别。 以一个TextView为例,如果我将它的layout_width设置为wrap_content,并将它的width设置为50 dip,会发生什么情况? 最佳答案
这两个属性有什么关系?如果我有 android:noHistory="true",那么有 android:finishOnTaskLaunch="true" 有什么意义吗? 最佳答案 假设您的应用中有
我是新手,正在尝试理解以下 XML 代码: 查看 developer.android.com 上的文档,它说“starStyle”是 R.attr 中的常量, public static final
在下面的代码中,为什么当我设置时单选按钮的外观会发生变化 android:layout_width="fill_parent" 和 android:width="fill_parent" 我说的是
很难说出这里要问什么。这个问题模棱两可、含糊不清、不完整、过于宽泛或夸夸其谈,无法以目前的形式得到合理的回答。如需帮助澄清此问题以便重新打开,visit the help center . 关闭 9
假设我有一个函数 fun myFunction(name:String, email:String){},当我调用这个函数时 myFunction('Ali', 'ali@test.com ') 如何
我是一名优秀的程序员,十分优秀!