我需要在我的 selectuser 类中调用类数据当用户从微调器中选择任何项目时我正在使用它
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
int icon = imgid1[userspinner.getSelectedItemPosition()];
prefs.edit().putInt("userposition", icon).commit();
data d = new data();
data d1 = d.Accept(userspinner.getSelectedItemPosition());
current.setText(d1.getWeapon_pack());
}
它显示错误
data d = new data();
这是堆栈跟踪
06-05 11:29:43.796 3011-3011/com.pttest.com.pockettankstips E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.pttest.com.pockettankstips, PID: 3011
java.lang.VerifyError: Rejecting class com.pttest.com.pockettankstips.data because it failed compile-time verification (declaration of 'com.pttest.com.pockettankstips.data' appears in /data/app/com.pttest.com.pockettankstips-2/base.apk)
at com.pttest.com.pockettankstips.selectuser.onItemSelected(selectuser.java:455)
at android.widget.AdapterView.fireOnSelected(AdapterView.java:897)
at android.widget.AdapterView.access$200(AdapterView.java:48)
at android.widget.AdapterView$SelectionNotifier.run(AdapterView.java:865)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)