[英]Decompiled .class file, bytecode version: 51.0 (java 7)
I am getting an error that says "source code does not match bytecode" with the description that "Decompiled.class file, bytecode version: 51.0 (java 7)" when I am calling onClickSelect()
method.当我调用
onClickSelect()
方法时,我收到一条错误消息,显示“源代码与字节码不匹配”和“Decompiled.class 文件,字节码版本:51.0 (java 7)”的描述。
It brings me to AppCompatViewInflater
class and highlights its built-in onClick()
method.它将我带到
AppCompatViewInflater
class 并突出显示其内置的onClick()
方法。
AppCompatViewInflater: AppCompatViewInflater:
public void onClick(@NonNull View v) {
if (this.mResolvedMethod == null) {
this.resolveMethod(this.mHostView.getContext(), this.mMethodName);
}
try {
this.mResolvedMethod.invoke(this.mResolvedContext, v);
} catch (IllegalAccessException var3) {
throw new IllegalStateException("Could not execute non-public method for android:onClick", var3);
} catch (InvocationTargetException var4) {
throw new IllegalStateException("Could not execute method for android:onClick", var4);
}
}
My code:我的代码:
public void onClickSelect(View view) {
TextView attack_pts = (TextView) findViewById(R.id.min_attack_value);
TextView defense_pts = (TextView) findViewById(R.id.min_defense_value);
TextView health_pts = (TextView) findViewById(R.id.min_health_value);
Intent intent = new Intent(this, PokemonListActivity.class);
intent.putExtra("min attack pts", attack_pts.getText().toString());
intent.putExtra("min defense pts", defense_pts.getText().toString());
intent.putExtra("min health pts", health_pts.getText().toString());
startActivity(intent);
}
Can you check the.class file java version and version that you are currently using to decompile.你能检查一下.class文件java版本和你当前用来反编译的版本。
It should be same.应该是一样的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.