diff --git a/README-zh.md b/README-zh.md
index d890c3cf..c5f58e6b 100644
--- a/README-zh.md
+++ b/README-zh.md
@@ -11,7 +11,7 @@
# 环境
- * Mac or Linux
+ * Mac Linux Windows
* Gradle 2.10+
* Java 1.7 +
@@ -26,7 +26,7 @@
apply plugin: 'robust'
- compile 'com.meituan.robust:robust:0.3.0'
+ compile 'com.meituan.robust:robust:0.3.1'
```
2. 在整个项目的build.gradle加入classpath
@@ -37,8 +37,8 @@
jcenter()
}
dependencies {
- classpath 'com.meituan.robust:gradle-plugin:0.3.0'
- classpath 'com.meituan.robust:auto-patch-plugin:0.3.0'
+ classpath 'com.meituan.robust:gradle-plugin:0.3.1'
+ classpath 'com.meituan.robust:auto-patch-plugin:0.3.1'
}
}
```
@@ -58,7 +58,7 @@
# AutoPatch
-Robust补丁自动化,为Robust自动生成补丁,使用者只需要提交修改完bug后的代码,运行和线上apk打包同样的gradle命令即可,会在项目的app/build/outputs/robust目录下生成补丁。
+Robust补丁自动化,为Robust自动生成补丁,使用者只需要提交修改完bug后的代码,运行和线上apk打包同样的gradle命令即可,会在项目的app/build/outputs/robust目录下生成补丁。更多自动化补丁信息请参考:[Android热更新方案Robust开源,新增自动化补丁工具](http://tech.meituan.com/android_autopatch.html) 。
# 使用方法
@@ -113,7 +113,7 @@ Robust补丁自动化,为Robust自动生成补丁,使用者只需要提交
```
2. 安装生成的apk。保存mapping.txt文件以及app/build/outputs/robust/methodsMap.robust文件
3. 修改代码之后,加上**@Modify**注解或者调用指定的方法
-4. 把保存的mapping.txt和methodsMap.robust放到app/robust目录下
+4. 把保存的**mapping.txt**和**methodsMap.robust**放到app/robust目录下
5. 执行和打包相同的gradle命令:
```java
@@ -128,7 +128,8 @@ Robust补丁自动化,为Robust自动生成补丁,使用者只需要提交
```
手机上补丁的路径是`PatchManipulateImp`中指定的
8. 打开App,点击Patch按钮就会加载补丁。
-9. 也可以加载app/robust的样例dex,修改了Jump_second_Activity跳转Activity的显示文字。
+9. 也可以加载app/robust的样例补丁,修改了Jump_second_Activity跳转Activity的显示文字。
+10. 在样例中我们给类```SecondActivity```的方法```getTextInfo(String meituan)```制作补丁,你可以自行定制
10. 补丁加载之后每次都会删除,再次运行需要重新copy补丁。
# 注意事项
diff --git a/README.md b/README.md
index 79548e3f..9a3667eb 100644
--- a/README.md
+++ b/README.md
@@ -5,13 +5,13 @@
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/Meituan-Dianping/Robust/pulls)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://raw.githubusercontent.com/Meituan-Dianping/Robust/master/LICENSE)
-Robust is an Android HotFix solution with high compatibility and high stability.Robust can fix bugs immediately without publishing apk.
+Robust is an Android HotFix solution with high compatibility and high stability. Robust can fix bugs immediately without publishing apk.
[中文说明](README-zh.md)
# Environment
- * Mac or Linux
+ * Mac Linux and Windows
* Gradle 2.10+
* Java 1.7 +
@@ -24,7 +24,7 @@ Robust is an Android HotFix solution with high compatibility and high stability.
//please uncomment fellow line before you build a patch
//apply plugin: 'auto-patch-plugin'
apply plugin: 'robust'
- compile 'com.meituan.robust:robust:0.3.0'
+ compile 'com.meituan.robust:robust:0.3.1'
```
2. Add below codes in the outest project's build.gradle file.
@@ -34,8 +34,8 @@ Robust is an Android HotFix solution with high compatibility and high stability.
jcenter()
}
dependencies {
- classpath 'com.meituan.robust:gradle-plugin:0.3.0'
- classpath 'com.meituan.robust:auto-patch-plugin:0.3.0'
+ classpath 'com.meituan.robust:gradle-plugin:0.3.1'
+ classpath 'com.meituan.robust:auto-patch-plugin:0.3.1'
}
}
```
@@ -57,7 +57,7 @@ When you build APK,you may need to save mapping.txt and files in build/outputs/r
# AutoPatch
-AutoPatch will generate patch for Robust automatically.You just need to fellow below steps to genrate patches.
+AutoPatch will generate patch for Robust automatically. You just need to fellow below steps to genrate patches. For more details please visit website http://tech.meituan.com/android_autopatch.html
# Steps
@@ -111,7 +111,7 @@ AutoPatch will generate patch for Robust automatically.You just need to fellow b
./gradlew clean assembleRelease --stacktrace --no-daemon
```
2. After install apk on your phone,you need to save **mapping.txt** and **app/build/outputs/robust/methodsMap.robust**
-3. Put mapping.txt and methodsMap.robust which are generated when you build the apks in diretory **app/robust/**,if not exists ,create it!
+3. Put mapping.txt and methodsMap.robust which are generated when you build the apks into diretory **app/robust/**,if directory not exists ,create it!
4. After modifying the code ,please put annotation `@Modify` on the modified methods or invoke `RobustModify.modify()` (designed for Lambda Expression )in the modified methods.
5. Run the same gradle command as you build the apk:
@@ -126,10 +126,9 @@ AutoPatch will generate patch for Robust automatically.You just need to fellow b
adb push ~/Desktop/code/robust/app/build/outputs/robust/patch.jar /sdcard/robust/patch_temp.jar
```
patch directory can be configured in ``PatchManipulateImp``.
-8. Open app,and click patch button,patch is used.
-
-9. Also you can use our sample dex in **app/robust/sample_patch.dex** ,this dex change text after you click **Jump_second_Activity** Button.
-
+8. Open app,and click **Patch** button,patch is used.
+9. Also you can use our sample patch in **app/robust/sample_patch.jar** ,this dex change text after you click **Jump_second_Activity** Button.
+10. In the demo ,we change the text showed on the second activity which is configured in the method ```getTextInfo(String meituan)``` in class ```SecondActivity```
10. Demo delete patch after used.You should copy patch everytimes.
# Attentions
diff --git a/app/build.gradle b/app/build.gradle
index c9dbf75b..752ab317 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -1,7 +1,7 @@
apply plugin: 'com.android.application'
apply plugin: 'me.tatarka.retrolambda'
-apply plugin: 'robust'
//apply plugin: 'auto-patch-plugin'
+apply plugin: 'robust'
android {
compileSdkVersion 24
buildToolsVersion "24.0.2"
diff --git a/app/robust.xml b/app/robust.xml
index 706aefe7..70d58439 100644
--- a/app/robust.xml
+++ b/app/robust.xml
@@ -21,6 +21,10 @@
false
+
+
+ true
+
diff --git a/app/robust/app-release.apk b/app/robust/app-release.apk
index c475f08f..00492bee 100644
Binary files a/app/robust/app-release.apk and b/app/robust/app-release.apk differ
diff --git a/app/robust/methodsMap.robust b/app/robust/methodsMap.robust
index f6f0fbd1..50ac7919 100644
Binary files a/app/robust/methodsMap.robust and b/app/robust/methodsMap.robust differ
diff --git a/app/robust/patch.jar b/app/robust/patch.jar
deleted file mode 100644
index 57f68304..00000000
Binary files a/app/robust/patch.jar and /dev/null differ
diff --git a/app/src/main/java/com/meituan/sample/MainActivity.java b/app/src/main/java/com/meituan/sample/MainActivity.java
index 53f1d8bd..db2f44fc 100644
--- a/app/src/main/java/com/meituan/sample/MainActivity.java
+++ b/app/src/main/java/com/meituan/sample/MainActivity.java
@@ -1,22 +1,40 @@
package com.meituan.sample;
-import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
-import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
-import com.meituan.Hll;
+import com.meituan.sample.robusttest.other.Hll;
import com.meituan.robust.Patch;
import com.meituan.robust.PatchExecutor;
import com.meituan.robust.RobustCallBack;
-
-import java.lang.reflect.Constructor;
+import com.meituan.sample.robusttest.ImageQualityUtil;
+import com.meituan.sample.robusttest.NoField;
+import com.meituan.sample.robusttest.SampleClass;
+import com.meituan.sample.robusttest.State;
+import com.meituan.sample.robusttest.Super;
+
+/**
+ *
+ * For users of Robust you may only to use MainActivity or SecondActivity,other classes are used for test.
+ *
+ * If you just want to use Robust ,we recommend you just focus on MainActivity SecondActivity and PatchManipulateImp.Especially three buttons in MainActivity
+ *
+ * in the MainActivity have three buttons; "SHOW TEXT " Button will change the text in the MainActivity,you can patch the show text.
+ *
+ * "PATCH" button will load the patch ,the patch path can be configured in PatchManipulateImp.
+ *
+ * "JUMP_SECOND_ACTIVITY" button will jump to the second ACTIVITY,so you can patch a Activity.
+ *
+ * Attention to this ,We recommend that one patch is just for one built apk ,because every built apk has its unique mapping.txt and resource id
+ *
+ *@author mivanzhang
+ */
public class MainActivity extends AppCompatActivity {
@@ -26,7 +44,6 @@ public class MainActivity extends AppCompatActivity {
Hll hll = new Hll(false);
-
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -34,41 +51,20 @@ protected void onCreate(Bundle savedInstanceState) {
button = (Button) findViewById(R.id.button);
textView = (TextView) findViewById(R.id.textView);
state = new State<>(hll);
- button.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- //除了get方法有拦截之外,其他的几个方法没有做拦截,可能是处理get set方法的误杀
- Toast.makeText(MainActivity.this, "arrived in ", Toast.LENGTH_SHORT).show();
- state.setIndex(hll, 1, 1l, new Object());
- Log.d("robust", "state.get() " + state.get().toString());
- Log.d("robust", " state.getIndex() " + state.getIndex());
- Super s = new Super();
- Log.d("robust", "patch result before :" + s.check());
- Log.d("robust", "patch result after:" + s.protextedMethod());
- textView.setText(s.getText());
- s.getinstance();
-// Log.d("robust", "s.getinstance(new Super())== : " + s.getinstance(new Super()));
- }
- });
Button patch = (Button) findViewById(R.id.patch);
+ //beigin to patch
patch.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
-// PatchUtils.applyPatch(MainActivity.this, "group", "1.0", "channel", 1233445l, "qwertyuiop1", "QQQQQQQQQQQ");
new PatchExecutor(getApplicationContext(), new PatchManipulateImp(), new Callback()).start();
}
});
- try {
- ImageQualityUtil.loadImage(null, null, null, 1, null);
- } catch (Exception e) {
- e.printStackTrace();
- }
findViewById(R.id.jump_second_activity).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
- Intent intent = (Intent) invokeReflectConstruct("android.content.Intent", new Object[]{MainActivity.this, SecondActivity.class}, new Class[]{Context.class, Class.class});
+ Intent intent = new Intent(MainActivity.this,SecondActivity.class);
startActivity(intent);
Log.d("robusttest", (new NoField()).toString());
Log.d("robusttest", ImageQualityUtil.getDefaultSize("asdasdasd"));
@@ -77,6 +73,26 @@ public void onClick(View v) {
}
});
+ button.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ Toast.makeText(MainActivity.this, "arrived in ", Toast.LENGTH_SHORT).show();
+ state.setIndex(hll, 1, 1l, new Object());
+ Log.d("robust", "state.get() " + state.get().toString());
+ Log.d("robust", " state.getIndex() " + state.getIndex());
+ Super s = new Super();
+ Log.d("robust", "patch result before :" + s.check());
+ Log.d("robust", "patch result after:" + s.protextedMethod());
+ textView.setText(s.getText());
+ s.getinstance();
+ }
+ });
+ //test situation,
+ try {
+ ImageQualityUtil.loadImage(null, null, null, 1, null);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
}
//patch data report
class Callback implements RobustCallBack {
@@ -109,17 +125,4 @@ public void exceptionNotify(Throwable throwable, String where) {
}
- public static Object invokeReflectConstruct(String className, Object[] parameter, Class[] args) {
- try {
- Class clazz = Class.forName(className);
- Constructor constructor = clazz.getDeclaredConstructor(args);
- constructor.setAccessible(true);
- return constructor.newInstance(parameter);
- } catch (Exception e) {
- Log.d("robust", "invokeReflectConstruct construct error " + className + " parameter " + parameter);
- e.printStackTrace();
- }
- throw new RuntimeException("invokeReflectConstruct error ");
- }
-
}
diff --git a/app/src/main/java/com/meituan/sample/PatchManipulateImp.java b/app/src/main/java/com/meituan/sample/PatchManipulateImp.java
index ba16cd8b..b180a03a 100644
--- a/app/src/main/java/com/meituan/sample/PatchManipulateImp.java
+++ b/app/src/main/java/com/meituan/sample/PatchManipulateImp.java
@@ -12,16 +12,26 @@
/**
* Created by mivanzhang on 17/2/27.
+ *
+ * We recommend you rewrite your own PatchManipulate class ,adding your special patch Strategy,in the demo we just load the patch directly
+ *
+ *
+ * Pay attention to the difference of patch's LocalPath and patch's TempPath
+ *
+ *
+ * We recommend LocalPath store the origin patch.jar which may be encrypted,while TempPath is the true runnable jar
*/
public class PatchManipulateImp extends PatchManipulate {
@Override
protected List fetchPatchList(Context context) {
//将app自己的robustApkHash上报给服务端,服务端根据robustApkHash来区分每一次apk build来给app下发补丁
+ //apkhash is the unique identifier for apk,so you cannnot patch wrong apk.
//String robustApkHash = RobustApkHashUtils.readRobustApkHash(context);
Patch patch = new Patch();
patch.setName("123");
- patch.setLocalPath(Environment.getExternalStorageDirectory().getPath()+ File.separator+"robust"+File.separator + "patch.dex");
+ //we recommend LocalPath store the origin patch.jar which may be encrypted,while TempPath is the true runnable jar
+ patch.setLocalPath(Environment.getExternalStorageDirectory().getPath()+ File.separator+"robust"+File.separator + "patch.jar");
patch.setTempPath(Environment.getExternalStorageDirectory().getPath()+ File.separator+"robust"+File.separator + "patch");
patch.setPatchesInfoImplClassFullName("com.meituan.robust.patch.PatchesInfoImpl");
List patches = new ArrayList();
@@ -29,11 +39,27 @@ protected List fetchPatchList(Context context) {
return patches;
}
+ /**
+ *
+ * @param context
+ * @param patch
+ * @return
+ *
+ * you can verify your patches here
+ */
@Override
+
protected boolean verifyPatch(Context context, Patch patch) {
return true;
}
+ /**
+ *
+ * @param patch
+ * @return
+ *
+ * you may download your patches here
+ */
@Override
protected boolean ensurePatchExist(Patch patch) {
return true;
diff --git a/app/src/main/java/com/meituan/sample/SecondActivity.java b/app/src/main/java/com/meituan/sample/SecondActivity.java
index ce0d9675..35c82e75 100644
--- a/app/src/main/java/com/meituan/sample/SecondActivity.java
+++ b/app/src/main/java/com/meituan/sample/SecondActivity.java
@@ -12,10 +12,14 @@
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
-import com.meituan.Hll;
+import com.meituan.sample.robusttest.other.Hll;
import com.meituan.robust.patch.RobustModify;
import com.meituan.robust.patch.annotaion.Add;
import com.meituan.robust.patch.annotaion.Modify;
+import com.meituan.sample.robusttest.ConcreateClass;
+import com.meituan.sample.robusttest.People;
+import com.meituan.sample.robusttest.State;
+import com.meituan.sample.robusttest.Super;
import java.lang.ref.WeakReference;
import java.lang.reflect.Field;
@@ -32,6 +36,7 @@ public class SecondActivity extends AppCompatActivity implements View.OnClickLis
public Hll hll = new Hll(true);
private People people = new People();
public static State state = new State(new Hll(true));
+
private String inlineToString(){
return super.toString();
}
@@ -41,25 +46,57 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
System.out.println(inlineToString());
setContentView(R.layout.activity_main2);
- new Handler().postDelayed(new PreloadWebviewRunnable(this), 1100);
- Log.d("robust", hll.getStrings(1, flag));
- Log.d("robust", getString(R.string.app_name));
+ //test lambda expression
TextView textView = (TextView) findViewById(R.id.secondtext);
textView.setOnClickListener(v -> {
RobustModify.modify();
+ //test inner class accessibility
people.setAddr("asdasd");
getInfo(state, new Super(), 1l);
Log.d("robust", " onclick in Listener");
}
);
-
+ //change text on the SecondActivity
textView.setText(getTextInfo(name));
+
+
+ // belows are test!!,you may ignore
+ // belows are test!!,you may ignore
+ // belows are test!!,you may ignore
+ // belows are test!!,you may ignore
+
+ //test inner class
+ new Handler().postDelayed(new PreloadWebviewRunnable(this), 1100);
+ Log.d("robust", hll.getStrings(1, flag));
+ Log.d("robust", getString(R.string.app_name));
+
+
+
+ //test for static methods
Log.d("robust", "getValue is " + getFieldValue("a", hll));
Log.d("robust", "==========" + getInfo(state, new Super(), 1L) + "=============");
- Toast.makeText(getApplicationContext(),"I am robust",Toast.LENGTH_SHORT).show();
+
+ //test for bundle
+ Bundle bundle=new Bundle();
+ bundle.putInt("asd",1);
+ bundle.getFloat("asd");
}
+ /**
+ * if you change the return value you will change the show text,in the demo we built a patch to change the text
+ */
+ @Modify
+ public String getTextInfo(String meituan) {
+ People p = new People();
+ p.setName("mivazhang");
+ p.setCates(" AutoPatch");
+ people.setName(" I am Patch");
+ ConcreateClass concreateClass = new ConcreateClass();
- // @Modify(value = "com.meituan.sample.Super.onCreate(android.os.Bundle)")
+// return "you make it!! name is " + p.getName() + " \npatch success " + people.getName() ;
+ return "error occur " + concreateClass.getA();
+ }
+
+// another usage of Modify anntation
// @Modify(value = "com.meituan.sample.SecondActivity.onCreate(android.os.Bundle)")
private String getInfo(State stae, Super s, long l) {
String json = "[1,2,3,4,5]";
@@ -83,22 +120,7 @@ public View onCreateView(String name, Context context, AttributeSet attrs) {
return super.onCreateView(name, context, attrs);
}
- @Modify
- // public String getTextInfo(String baidu, People p) {
- public String getTextInfo(String baidu) {
- Bundle bundle=new Bundle();
- bundle.putInt("asd",1);
- bundle.getFloat("asd");
- RobustModify.modify();
- People p = new People();
- p.setName("mivazhang");
- p.setCates(" AutoPatch");
- people.setAddr(baidu);
- people.setName(" I am Patch");
- ConcreateClass concreateClass = new ConcreateClass();
- return p.getCates() + "you make it!! " + p.getName() + baidu + getTextI1(flag) + people.getAddr() + " name is " + people.getName() + " conreate class getA " + concreateClass.getA();
-// return "error " + concreateClass.getA();
- }
+
@Add
diff --git a/app/src/main/java/com/meituan/sample/AbstractClass.java b/app/src/main/java/com/meituan/sample/robusttest/AbstractClass.java
similarity index 81%
rename from app/src/main/java/com/meituan/sample/AbstractClass.java
rename to app/src/main/java/com/meituan/sample/robusttest/AbstractClass.java
index f828ddc7..7a131caa 100644
--- a/app/src/main/java/com/meituan/sample/AbstractClass.java
+++ b/app/src/main/java/com/meituan/sample/robusttest/AbstractClass.java
@@ -1,4 +1,4 @@
-package com.meituan.sample;
+package com.meituan.sample.robusttest;
/**
* Created by mivanzhang on 16/11/10.
@@ -14,6 +14,6 @@ public int getInt(int dex) {
}
public String getA() {
- return "new";
+ return " !!! ";
}
}
diff --git a/app/src/main/java/com/meituan/sample/CallBack.java b/app/src/main/java/com/meituan/sample/robusttest/CallBack.java
similarity index 71%
rename from app/src/main/java/com/meituan/sample/CallBack.java
rename to app/src/main/java/com/meituan/sample/robusttest/CallBack.java
index 8d135548..d3c91f1d 100644
--- a/app/src/main/java/com/meituan/sample/CallBack.java
+++ b/app/src/main/java/com/meituan/sample/robusttest/CallBack.java
@@ -1,4 +1,4 @@
-package com.meituan.sample;
+package com.meituan.sample.robusttest;
/**
* Created by mivanzhang on 16/12/30.
diff --git a/app/src/main/java/com/meituan/sample/ConcreateClass.java b/app/src/main/java/com/meituan/sample/robusttest/ConcreateClass.java
similarity index 85%
rename from app/src/main/java/com/meituan/sample/ConcreateClass.java
rename to app/src/main/java/com/meituan/sample/robusttest/ConcreateClass.java
index 20b70e86..6aa3de58 100644
--- a/app/src/main/java/com/meituan/sample/ConcreateClass.java
+++ b/app/src/main/java/com/meituan/sample/robusttest/ConcreateClass.java
@@ -1,4 +1,4 @@
-package com.meituan.sample;
+package com.meituan.sample.robusttest;
/**
* Created by mivanzhang on 16/11/10.
diff --git a/app/src/main/java/com/meituan/sample/ImageQualityUtil.java b/app/src/main/java/com/meituan/sample/robusttest/ImageQualityUtil.java
similarity index 99%
rename from app/src/main/java/com/meituan/sample/ImageQualityUtil.java
rename to app/src/main/java/com/meituan/sample/robusttest/ImageQualityUtil.java
index b0c5dbb0..ad934f67 100644
--- a/app/src/main/java/com/meituan/sample/ImageQualityUtil.java
+++ b/app/src/main/java/com/meituan/sample/robusttest/ImageQualityUtil.java
@@ -1,4 +1,4 @@
-package com.meituan.sample;
+package com.meituan.sample.robusttest;
/**
* Created by mivanzhang on 16/10/24.
diff --git a/app/src/main/java/com/meituan/sample/InnerTest.java b/app/src/main/java/com/meituan/sample/robusttest/InnerTest.java
similarity index 80%
rename from app/src/main/java/com/meituan/sample/InnerTest.java
rename to app/src/main/java/com/meituan/sample/robusttest/InnerTest.java
index 3e68a56b..e10116d3 100644
--- a/app/src/main/java/com/meituan/sample/InnerTest.java
+++ b/app/src/main/java/com/meituan/sample/robusttest/InnerTest.java
@@ -1,6 +1,7 @@
-package com.meituan.sample;
+package com.meituan.sample.robusttest;
import com.meituan.robust.patch.annotaion.Add;
+import com.meituan.sample.SecondActivity;
/**
* Created by mivanzhang on 17/2/8.
diff --git a/app/src/main/java/com/meituan/sample/JustTest.java b/app/src/main/java/com/meituan/sample/robusttest/JustTest.java
similarity index 77%
rename from app/src/main/java/com/meituan/sample/JustTest.java
rename to app/src/main/java/com/meituan/sample/robusttest/JustTest.java
index 5497b450..96b89161 100644
--- a/app/src/main/java/com/meituan/sample/JustTest.java
+++ b/app/src/main/java/com/meituan/sample/robusttest/JustTest.java
@@ -1,4 +1,4 @@
-package com.meituan.sample;
+package com.meituan.sample.robusttest;
/**
* Created by mivanzhang on 16/10/21.
diff --git a/app/src/main/java/com/meituan/sample/NewAddCLass.java b/app/src/main/java/com/meituan/sample/robusttest/NewAddCLass.java
similarity index 85%
rename from app/src/main/java/com/meituan/sample/NewAddCLass.java
rename to app/src/main/java/com/meituan/sample/robusttest/NewAddCLass.java
index 932e4051..4914d7de 100644
--- a/app/src/main/java/com/meituan/sample/NewAddCLass.java
+++ b/app/src/main/java/com/meituan/sample/robusttest/NewAddCLass.java
@@ -1,4 +1,4 @@
-package com.meituan.sample;
+package com.meituan.sample.robusttest;
import com.meituan.robust.patch.annotaion.Add;
diff --git a/app/src/main/java/com/meituan/sample/NoField.java b/app/src/main/java/com/meituan/sample/robusttest/NoField.java
similarity index 94%
rename from app/src/main/java/com/meituan/sample/NoField.java
rename to app/src/main/java/com/meituan/sample/robusttest/NoField.java
index ee5befec..18994025 100644
--- a/app/src/main/java/com/meituan/sample/NoField.java
+++ b/app/src/main/java/com/meituan/sample/robusttest/NoField.java
@@ -1,4 +1,4 @@
-package com.meituan.sample;
+package com.meituan.sample.robusttest;
import android.util.Log;
diff --git a/app/src/main/java/com/meituan/sample/People.java b/app/src/main/java/com/meituan/sample/robusttest/People.java
similarity index 99%
rename from app/src/main/java/com/meituan/sample/People.java
rename to app/src/main/java/com/meituan/sample/robusttest/People.java
index fe112f92..f9e1161a 100644
--- a/app/src/main/java/com/meituan/sample/People.java
+++ b/app/src/main/java/com/meituan/sample/robusttest/People.java
@@ -1,4 +1,4 @@
-package com.meituan.sample;
+package com.meituan.sample.robusttest;
/**
* Created by mivanzhang on 16/10/20.
diff --git a/app/src/main/java/com/meituan/sample/SampleClass.java b/app/src/main/java/com/meituan/sample/robusttest/SampleClass.java
similarity index 96%
rename from app/src/main/java/com/meituan/sample/SampleClass.java
rename to app/src/main/java/com/meituan/sample/robusttest/SampleClass.java
index 92486de8..66da06df 100644
--- a/app/src/main/java/com/meituan/sample/SampleClass.java
+++ b/app/src/main/java/com/meituan/sample/robusttest/SampleClass.java
@@ -1,4 +1,4 @@
-package com.meituan.sample;
+package com.meituan.sample.robusttest;
import com.meituan.robust.patch.annotaion.Modify;
diff --git a/app/src/main/java/com/meituan/sample/State.java b/app/src/main/java/com/meituan/sample/robusttest/State.java
similarity index 96%
rename from app/src/main/java/com/meituan/sample/State.java
rename to app/src/main/java/com/meituan/sample/robusttest/State.java
index af3cfb9c..8be1ea7d 100644
--- a/app/src/main/java/com/meituan/sample/State.java
+++ b/app/src/main/java/com/meituan/sample/robusttest/State.java
@@ -1,8 +1,8 @@
-package com.meituan.sample;
+package com.meituan.sample.robusttest;
import android.util.Log;
-import com.meituan.Hll;
+import com.meituan.sample.robusttest.other.Hll;
import java.util.ArrayList;
import java.util.List;
diff --git a/app/src/main/java/com/meituan/sample/Super.java b/app/src/main/java/com/meituan/sample/robusttest/Super.java
similarity index 96%
rename from app/src/main/java/com/meituan/sample/Super.java
rename to app/src/main/java/com/meituan/sample/robusttest/Super.java
index 491064c8..8b3416ab 100644
--- a/app/src/main/java/com/meituan/sample/Super.java
+++ b/app/src/main/java/com/meituan/sample/robusttest/Super.java
@@ -1,9 +1,10 @@
-package com.meituan.sample;
+package com.meituan.sample.robusttest;
import android.util.Log;
-import com.meituan.Hll;
+import com.meituan.sample.robusttest.other.Hll;
import com.meituan.robust.patch.annotaion.Modify;
+import com.meituan.sample.SecondActivity;
/**
* Created by mivanzhang on 16/7/21.
diff --git a/app/src/main/java/com/meituan/Hll.java b/app/src/main/java/com/meituan/sample/robusttest/other/Hll.java
similarity index 91%
rename from app/src/main/java/com/meituan/Hll.java
rename to app/src/main/java/com/meituan/sample/robusttest/other/Hll.java
index 31ca5d0e..a477ecf6 100644
--- a/app/src/main/java/com/meituan/Hll.java
+++ b/app/src/main/java/com/meituan/sample/robusttest/other/Hll.java
@@ -1,12 +1,12 @@
-package com.meituan;
+package com.meituan.sample.robusttest.other;
import android.util.Log;
-import com.meituan.sample.CallBack;
+import com.meituan.sample.robusttest.CallBack;
import static android.R.attr.name;
-import static com.meituan.sample.State.index;
+import static com.meituan.sample.robusttest.State.index;
/**
* Created by c_kunwu on 16/5/13.
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index d4d2723f..7b345e6c 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -25,7 +25,7 @@
android:layout_marginEnd="248dp"
android:layout_marginRight="248dp"
android:layout_marginTop="37dp"
- android:text="New Button" />
+ android:text="SHOW TEXT" />