I followed the tutorial from Android Studio to make my first App.
On this page is explained to 'Create a second activity'.
https://developer.android.com/training/basics/firstapp/starting-activity.html
I think I followed everything like explained but got a still a few errors.
In this part of code I got an error
Intent intent = getIntent();
String message = intent.getStringExtra(MainActivity.EXTRA_MESSAGE);
TextView textView = new TextView(this);
textView.setTextSize(40);
textView.setText(message);
ViewGroup layout = (ViewGroup) findViewById(R.id.activity_display_message);
layout.addView(textView);
I got an error : Cannot resolve symbol for the SetTextSize, SetText and addView. In an earlier part of the tutorial is following explained :
Android Studio will display Cannot resolve symbol errors because this code references classes that are not imported. You can solve some of these with Android Studio's "import class" functionality by pressing Alt + Enter (or Option + Return on Mac).
For earlier errors I solved the problem like mentioned but for those I don't see the possibility to import the class.
How do I solve this problem.
On this page is explained to 'Create a second activity'.
https://developer.android.com/training/basics/firstapp/starting-activity.html
I think I followed everything like explained but got a still a few errors.
In this part of code I got an error
Intent intent = getIntent();
String message = intent.getStringExtra(MainActivity.EXTRA_MESSAGE);
TextView textView = new TextView(this);
textView.setTextSize(40);
textView.setText(message);
ViewGroup layout = (ViewGroup) findViewById(R.id.activity_display_message);
layout.addView(textView);
I got an error : Cannot resolve symbol for the SetTextSize, SetText and addView. In an earlier part of the tutorial is following explained :
Android Studio will display Cannot resolve symbol errors because this code references classes that are not imported. You can solve some of these with Android Studio's "import class" functionality by pressing Alt + Enter (or Option + Return on Mac).
For earlier errors I solved the problem like mentioned but for those I don't see the possibility to import the class.
How do I solve this problem.