當使用ProGuard儘快的第一個活動是顯示給用戶建立自己的Android應用程序,我得到以下錯誤,那麼應用程序徹底崩潰了:的NoSuchMethodError錯誤時Proguard的爲OnClickListener
java.lang.NoSuchMethodError: android.content.res.XmlResourceParser.i
at ActivityNewUserSetup.OnClickOKButton()
at ActivityNewUserSetup.onCreate()
at android.app.Activity.performCreate(Activity.java:5231)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Method.java)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(NativeStart.java)
代碼這似乎是指在ActivityNewUserSetup類:
@Override
protected void onCreate(Bundle savedInstanceState)
{
...code omitted for clarity
Button btnOK = (Button) findViewById(R.id.btn_Confirm_Selection);
btnOK.setOnClickListener(OnClickOKButton());
}
View.OnClickListener OnClickOKButton()
{
return new View.OnClickListener()
{
public void onClick(View v)
{
...code omitted for clarity
}
}
}
我用在這裏找到基本的ProGuard模板配置文件:
Android: What are the recommended configurations for Proguard?
如果是監聽程序正在跳轉功能,我需要在proguard文件中添加什麼來停止該功能?
我ProGuard的版本是4.7
感謝您的線索羅伯特這是一個第三方JAR扔東西關閉 – Hevski