cancel
Showing results for 
Search instead for 
Did you mean: 

SUP 2.2 + Androd throw exception at Application.getInstance().setApplicationContext(this);

Former Member
0 Kudos

Im try to use Sybase Unwired Platform with generated code for Android. I have exception in folowing code:


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

Debug window look like

All crashes after begining of execution of that line:

Why it  crashed?

Accepted Solutions (1)

Accepted Solutions (1)

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

which android version you are working on?

Former Member
0 Kudos

Android version is 4.1.2 (API 16)

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

Did you try with android version 4.2 ? Did you face similar issue?

Rgrds,

Jitendra

Former Member
0 Kudos

I tried Android 4.2.2.


Issue similar.

I am using Android Developer Tools Build: v22.3.0-887826 instead ADT Plugin for Eclipse 21.0.

midhun_vp
Active Contributor
0 Kudos

Have you updated the sdk and checked?

Former Member
0 Kudos

Yes, I did

midhun_vp
Active Contributor
0 Kudos

What is the exception you are getting in the error log of android sdk ?

- Midhun VP

Former Member
0 Kudos

RuntimeException

midhun_vp
Active Contributor
0 Kudos

Look at the error logs for details in the eclipse.

Answers (1)

Answers (1)

midhun_vp
Active Contributor
0 Kudos

Upgrade the Android SDK (using SDK manager) to the latest version and run the app. Hope that solves this issue.

- Midhun VP