应用程序不幸关闭

时间:2015-04-14 21:25:48

标签: android-studio

我收到“App很遗憾停止”错误。我正在使用解析,所以我假设问题出在其中的某个地方。

这是我在加载

时导致错误的java文件
public class NewTipActivity extends Activity {

private Tip tip;

@Override
protected void onCreate(Bundle savedInstanceState) {
   tip = new Tip();
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
    super.onCreate(savedInstanceState);

    //New Tip Fragment
    setContentView(R.layout.activity_new_tip);
    FragmentManager manager = getFragmentManager();
    Fragment fragment = manager.findFragmentById(R.id.fragmentContainer);

    if (fragment == null) {
        fragment = new NewTipFragment();
        manager.beginTransaction().add(R.id.fragmentContainer, fragment)
                .commit();
    }

}

public Tip getCurrentTip() {
    return tip;
}
}
  

java.lang.RuntimeException:无法启动活动   ComponentInfo {com.holyapp.danshinn.wingman_etiquette / com.holyapp.danshinn.wingman_etiquette.NewTipActivity}:   java.lang.IllegalArgumentException:无法为用户设置setReadAccess   带有null id       在android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2211)       在android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)       在android.app.ActivityThread.access $ 600(ActivityThread.java:141)       在android.app.ActivityThread $ H.handleMessage(ActivityThread.java:1256)       在android.os.Handler.dispatchMessage(Handler.java:99)       在android.os.Looper.loop(Looper.java:137)       在android.app.ActivityThread.main(ActivityThread.java:5103)       at java.lang.reflect.Method.invokeNative(Native Method)       在java.lang.reflect.Method.invoke(Method.java:525)       在com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:737)        在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)        at dalvik.system.NativeStart.main(Native Method)        引起:java.lang.IllegalArgumentException:对于具有null id的用户,不能setReadAccess        在com.parse.ParseACL.setReadAccess(ParseACL.java:308)        在com.parse.ParseACL.getDefaultACL(ParseACL.java:61)        在com.parse.ParseObject.setDefaultValues(ParseObject.java:3385)        在com.parse.ParseObject。(ParseObject.java:181)        在com.parse.ParseObject。(ParseObject.java:127)        在com.holyapp.danshinn.wingman_etiquette.Tip。(Tip.java:17)        在com.holyapp.danshinn.wingman_etiquette.NewTipActivity.onCreate(NewTipActivity.java:20)       在android.app.Activity.performCreate(Activity.java:5133)       在android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)       在android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2175)       在android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)       在android.app.ActivityThread.access $ 600(ActivityThread.java:141)       在android.app.ActivityThread $ H.handleMessage(ActivityThread.java:1256)       在android.os.Handler.dispatchMessage(Handler.java:99)       在android.app.Looper.loop(Looper.java:137)android.app.ActivityThread.main(ActivityThread.java:5103)       at java.lang.reflect.Method.invokeNative(Native Method)       在java.lang.reflect.Method.invoke(Method.java:525)       在com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:737)       在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)       在dalvik.system.NativeStart.main(本地方法)

0 个答案:

没有答案