问题描述
- android代码混淆时报错
-
android代码混淆时报错,本地库文件在 android_41945.jar 中检测到,可是我根本都不知道 android_41945.jar 是个什么文件,我项目中都找不到,不知怎么解决这种问题。
出错信息如下:[2014-12-18 14:23:52 - EParkV3.0] Native libraries detected in 'android_41945.jar'. See console for more information.
[2014-12-18 14:23:52 - EParkV3.0] The library 'android_41945.jar' contains native libraries that will not run on the device.
[2014-12-18 14:23:52 - EParkV3.0] The following libraries were found:
[2014-12-18 14:23:52 - EParkV3.0] - libamapv304.so
[2014-12-18 14:23:52 - EParkV3.0] - libamapv304ex.so
[2014-12-18 14:23:52 - EParkV3.0] - libmsc.so
[2014-12-18 14:23:52 - EParkV3.0] - libtbt.so
解决方案
你是不是在项目中添加了第三方Jar包,不要混淆这些Jar包
解决方案二:
是加了第三方jar包的,可是我进行了设置,不混淆jar包啊。不知设置的对不对
-dontskipnonpubliclibraryclasses
-dontpreverify
-ignorewarnings
-verbose
-dontwarn com.amap.**
-dontwarn com.iflytek.**
-dontwarn android.support.**
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
-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 com.android.vending.licensing.ILicensingService
-keep public class * extends android.support.v4.**
-keep public class com.amap.**
-keep public class SharedPreferencesUtil
-keep public class * extends android.view.View
-keepclasseswithmembernames class * {
native <methods>;
}
-keepclasseswithmembernames class * {
public <init>(android.content.Context, android.util.AttributeSet);
}
-keepclasseswithmembernames class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
}
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
-keep class com.fangle.epark.jsonvo.**
-keep class com.amap.**{
*;
}
-keep class com.iflytek.**{
*;
}
-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
解决方案三:
我是加了高德地图的jar包和科大讯飞语音jar包,高德地图的jar包类的包名都是com.amap.** ,科大讯飞的jar包的类的包名都是com.iflytek.**
时间: 2025-01-08 00:39:48