What is wrong with this error, please,,,,,,,,
And define the Button class and View appear the following error:
Use 3.4.2 version of the android studio,,,
CodePudding user response:
You put functions are written in the oncreate oncreate outside
CodePudding user response:
; Number???????
CodePudding user response:
Put your Boolean create 11-14 lines that outside the oncreate
CodePudding user response:
Changed after became like this:
CodePudding user response:
And use in 3.4.2 use @ override is wrong,,,,
CodePudding user response:
OnCreateOptions
M emu, capital you look at what you wrote
CodePudding user response:
refer to 6th floor usecf response: onCreateOptions M emu, capital you look at what you wrote After the changed or wrong... CodePudding user response:
Stick your code all error messages are posted CodePudding user response:
CodePudding user response:
The name of the class capitalize the first letter Extends class parentheses to remove @Override CodePudding user response:
You is kotlin file ah, want to use kotlin grammar, if you want to written in Java, please change the Java file CodePudding user response:
First of all, the class name initials university Second, Android studio is now the default generated MainActivity. Kt is kotlin file you write Java syntax is definitely wrong, Either delete MainActivity. Kt, create a MainActivity. Java Either study kotlin grammar to write again CodePudding user response:
Suggest a career change, stick to CodePudding user response:
Kt is a variable that the return value type, you this syntax is CodePudding user response:
refer to the second floor weixin_40290083 response: ; Number??????? ???? Need??? CodePudding user response:
Kotlin primer to buy a book to see CodePudding user response:
You should use kotlin, are you using the Java syntax, suggested to use kotlin development study CodePudding user response:
Chou Chou??? CodePudding user response:
Your public and; Why not? CodePudding user response:
Behind the beginning inherit AppCompatActivity, there should be no (), should be removed CodePudding user response:
This I don't know what to ask CodePudding user response:
Beginning of self-study, please advice learn Java then kt this is kt new file you choose Java don't choose kt CodePudding user response:
This is Kotlin language ah, you are not familiar with. Why doesn't the traditional Java? CodePudding user response:
Kotlin: The class FirstActivity: AppCompatActivity () { Override fun onCreate (savedInstanceState: Bundle? { Super. OnCreate (savedInstanceState) } Override fun onCreateOptionsMenu (menu: a menu? : Boolean { MenuInflater. Inflate (R.m emu menu_complete, menu) Return true } } Java: Public class FirstActivity extends AppCompatActivity { @ Override Protected void onCreate (@ Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); } @ Override Public Boolean onCreateOptionsMenu (Menu Menu) { GetMenuInflater (). Inflate (R.m emu. Menu_complete, menu). return true; } } CodePudding user response:
You won't kotlin, what are you doing in kotli? CodePudding user response:
Whether bump unlined upper garment, face the problems caused by? CodePudding user response:
After you study well kotlin method is used, again, a lot of mistakes in grammar,