[英]Spring Boot app "bean name for bean class conflicts with existing" - how to exclude package/Class from 3rd party library/dependency?
[英]Exclude 3rd party libraries, it's class & sub class from ProGuard with Android using Eclipse IDE
當我嘗試在ProGuard中排除第三方庫時出現以下錯誤。
如果我在proguard-project.txt中添加“ -dontwarn com.ak.systemservice.core.security.FuncManager”,則正在編譯,但是嘗試運行時會崩潰。
基本上,我不想在jar或整個jar中混淆“ com.ak.systemservice。core.security.FuncManager”類,並希望在我的活動中使用“ com.ak.systemservice。core.security.FuncManager”。 提前致謝。
錯誤如下:
[2016-01-26 17:00:27-MyApp] Proguard返回了錯誤代碼1。請參閱控制台
[2016-01-26 17:00:27-MyApp]警告:com.ak.systemservice.core.security.FuncManager:找不到引用的類android.os.ServiceManager
[2016-01-26 17:00:27-MyApp]警告:com.ak.systemservice.core.security.FuncManager:找不到引用的類android.os.ServiceManager
[2016-01-26 17:00:27-MyApp]警告:com.ak.systemservice.core.security.FuncManager:找不到引用的類android.security.FuncService $ Stub
[2016-01-26 17:00:27-MyApp]警告:com.ak.systemservice.core.security.FuncManager:找不到引用的類android.security.FuncService $ Stub
[2016-01-26 17:00:27-MyApp]警告:com.ak.systemservice.core.security.FuncManager:找不到引用的類android.security.FuncService
[2016-01-26 17:00:27-MyApp]警告:com.ak.systemservice.core.security.FuncManager:找不到引用的類android.security.FuncService
[2016-01-26 17:00:27-MyApp]警告:com.ak.systemservice.core.security.FuncManager:找不到引用的類com.ak.systemservice.core.security.FuncManager $ 1
[2016-01-26 17:00:27-MyApp]警告:com.ak.systemservice.core.security.FuncManager:找不到引用的類com.ak.systemservice.core.security.FuncManager $ 1
[2016-01-26 17:00:27-MyApp]警告:com.ak.systemservice.core.security.FuncManager:找不到引用的類android.security.FuncService
[2016-01-26 17:00:27-MyApp]警告:com.ak.systemservice.core.security.FuncManager:找不到引用的類android.security.FuncService
[2016-01-26 17:00:27-MyApp]警告:com.ak.systemservice.core.security.FuncManager:找不到引用的類android.security.FuncService
[2016-01-26 17:00:27-MyApp]警告:com.ak.systemservice.core.security.FuncManager:找不到引用的類android.security.FuncService
[2016-01-26 17:00:27-MyApp]警告:com.ak.systemservice.core.security.FuncManager:找不到引用的類android.security.FuncService
[2016-01-26 17:00:27-MyApp]警告:com.ak.systemservice.core.security.FuncManager:找不到引用的類android.security.FuncService
[2016-01-26 17:00:27-MyApp]警告:com.ak.systemservice.core.security.FuncManager:找不到引用的類android.security.FuncService
[2016-01-26 17:00:27-MyApp]警告:com.ak.systemservice.core.security.FuncManager:找不到引用的類android.security.FuncService
您可以通過避免縮小此類來解決此問題。 將此添加到您的proguard文件中,
-keep class com.ak.** { *; }
-keep interface com.ak.** { *; }
-keep enum com.ak.** { *; }
或者您也可以保持個人班級。 像這樣,
-keep class com.ak.systemservice.core.security.FuncManager
還沒! 感謝您的跟進! 在執行此步驟之前,遇到JNI本機回調錯誤,應用程序崩潰了! proguard會以某種方式剝離JNI方法名稱並導致崩潰。 我如何確保ProGuard沒有去除JNI? 如何使特定的JNI回調方法遠離ProGuard?
謝謝,
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.