Meituan-Dianping / Robust

Robust is an Android HotFix solution with high compatibility and high stability. Robust can fix bugs immediately without a reboot.
Apache License 2.0
4.42k stars 807 forks source link

制作补丁异常 #251

Open worldSoBeautiful opened 6 years ago

worldSoBeautiful commented 6 years ago

在提交issue之前,我们应该先查询是否已经有相关的issue和ReadMe中的注意事项,比如说Robust在0.3.3版本才支持windows开发。提交issue时,我们需要写明issue的原因,最好可以携带编译或运行过程的日志或者截图。issue最好以下面的格式提出:

异常类型:编译异常

Robust版本:如:0.4.78

Gradle版本:如:3.0.0

系统 window

堆栈/日志: autopatch read all class file cost 0.169 second check all class cost 0.498 second, class count: 1647 new add methods list is key is com.example.fuck.robust.TestActivity.getText()

new add classes list is

patchMethodSignatureSet is printed below key is com.example.fuck.robust.TestActivity.onCreate(android.os.Bundle)

Warning class name setText(java.lang.CharSequence) can not find in mapping !! java -jar D:\Program Files\Robust\app\robust\dx.jar --dex --output=classes.dex meituan.jar errorStream output Error: Unable to access jarfile D:\Program

:app:transformClassesWithAutoPatchTransformForRelease (Thread[Daemon worker,5,main]) completed. Took 2.257 secs.

worldSoBeautiful commented 6 years ago

public class TestActivity extends AppCompatActivity { public TextView textView;

// @Modify protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_second); initView(); textView.setText("12345"); }

private void initView() {
    textView = findViewById(R.id.tv_notice);
}

// @Add // public String getText(){ // return "Robust修复"; // }

附上修复代码

worldSoBeautiful commented 6 years ago

textView.setText(getText())这样而已