compilation error while defining a string

Danial Bayat :

I am pretty new in android studio and I am following a tutorial from youtube, in that tutorial the lecturer define a string which works fine for him as shown in this picthis is the picture of what the lecturer did

but in my case when I write exactly the same code it throws compilation error as shown in this pic my code

please show me the right way in order to solve it, because it is really making me crazy

Hai Hack :

Your are using Kotlin instead of Java (which is programming language in your tutorial).

In Kotlin, define variable as following:

val TAG= "Activity One"

when your create your project, select Java as the default language

enter image description here

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

GObject Compilation Error in Macro Expansion While Defining Class

Compilation error while using to_string in c++ program

Compilation error for defining static array with pointers

Bad String compilation error

Error while making conditional compilation

Kapacitor: Getting error while defining tick file

Error while defining enum values in Rails

Error while defining a \newcommand using xcolor package

Receiving an Error While Defining a Class Member Function

Getting Error While Defining Stored Procedure MySQL

Compilation error when defining and using std::map in C++

Key Error when defining string, python

Flask error: Error in the code while defining functions and app route

While(false) causes unreachable statement compilation error

Compilation error while running a spring boot application

Compilation error while wrapping method throwing exception

compilation problem/error while using an rxjs switchmap

Compilation Error while creating jobs in oracle

Strange character added while compilation, leads to an error

Compilation error is displayed while running the given program

Compilation error while running code with RxJava

compilation error while making a tetris game

Maven compilation error while building strongbox

Compilation Error while editing the visual studio solution

error in compilation while looping over map

Compilation error while adding onClickListener for Button

Getting compilation error while building a project

Reached end of file while parsing compilation error

Compilation error while implementing extensible record