jpush-react-native android 集成报错

zzzeee
2017-05-19 09:05 2.5k 0

自动运行脚本失败,手动配置后,运行 react-native run-android后报错,怎么破?

MainActivity.java 文件内容如下:

package com.jingtao;
import com.facebook.react.ReactActivity;
public class MainActivity extends ReactActivity {
/
* Returns the name of the main component registered from JavaScript.
* This is used to schedule rendering of the component.
*/
  @override
  protected String getMainComponentName() {
    return "jingtao";
  }
  @override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    JPushInterface.init(this);
  }
 @override
   protected void onPause() {
     super.onPause();
    JPushInterface.onPause(this);
  }
  @override
  protected void onResume() {
      super.onResume();
     JPushInterface.onResume(this);
  }
}

删除MainActivity.java后添加的内容后:

1个回答

热门排序
  • KenChoi
    2017-05-19 09:14

    clean 一下项目,由于升级版本,缓存的编译结果与新的 jar 包冲突。