我尝试将 Sybase Unwired Platform 与生成的 Android 代码一起使用。我在以下代码中有例外:
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Application app = Application.getInstance();
String AppName = "timesheets";
if (app.getApplicationIdentifier() == null)
app.setApplicationIdentifier(AppName);
if (app.getApplicationContext() == null)
app.setApplicationContext(this); //Place where app crashes
调试窗口看起来像
开始执行该行后的所有崩溃:
Android 版本为 4.1.2 (API 16)
为什么会崩溃?