I am trying to implement a class extending the application to keep my global variables. I get an error
//when debugging and trying to go through line 6 the debugger says: source not found , and there is a button that says "Edit source lookup path"
Code:
public class MyApp extends Application {
public String username;
public String session;
public String key;
}
Code:
public class MyActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.loader);
MyApp app = ((MyApp)getApplicationContext());
//when debugging and trying to go through the line above the debugger says: source not found , and there is a button that says "Edit source lookup path"
String username = app.username;
}
}