title: I can't see the elements by their id in Android Studio
body: <p>I'm a new Kotlin Programmer. I tried to change the app icon by deleting the ic_launcher.png files and replacing my own images. As i see that is ridiculous what i'm trying to do, i copied the &quot;Main Activity.kt&quot; and &quot;main_activity.xml&quot; files and created a new project. As i tried to copy the files into the new project, the program throws a lot of errors:</p>
  <p><a href="https://i.stack.imgur.com/IRRxk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IRRxk.png" alt="The Main Activity" /></a></p>
  <p>It didn't imported the &quot;kotlinx&quot; packet and didn't perceive the elements in the xml file. As i tried to create an another new project to try whether the problem is only for this project, i realized that Android Studio doesn't perceive the xml elements anymore.</p>
  <p><a href="https://i.stack.imgur.com/yMrbv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yMrbv.png" alt="It doesn't see the UI elements" /></a></p>
  <p><em>Here are some important infos about my project:</em></p>
  <p><strong>The Android Manifest XML File</strong></p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      package=&quot;com.ihdovanay.myapplication&quot;&gt;
  
      &lt;application
          android:allowBackup=&quot;true&quot;
          android:icon=&quot;@mipmap/ic_launcher&quot;
          android:label=&quot;@string/app_name&quot;
          android:roundIcon=&quot;@mipmap/ic_launcher_round&quot;
          android:supportsRtl=&quot;true&quot;
          android:theme=&quot;@style/Theme.MyApplication&quot;&gt;
          &lt;activity android:name=&quot;.MainActivity&quot;&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name=&quot;android.intent.action.MAIN&quot; /&gt;
  
                  &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  <p><strong>The Build Gradle File of The Project</strong></p>
  <pre><code>buildscript {
      ext.kotlin_version = &quot;1.4.10&quot;
      repositories {
          google()
          jcenter()
      }
      dependencies {
          classpath &quot;com.android.tools.build:gradle:4.1.0&quot;
          classpath &quot;org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version&quot;
      }
  }
  
  allprojects {
      repositories {
          google()
          jcenter()
      }
  }
  
  task clean(type: Delete) {
      delete rootProject.buildDir
  }
  </code></pre>
  <p><strong>The Build Gradle File of the Module</strong></p>
  <pre><code>plugins {
      id 'com.android.application'
      id 'kotlin-android'
  }
  
  android {
      compileSdkVersion 30
      buildToolsVersion &quot;30.0.2&quot;
  
      defaultConfig {
          applicationId &quot;com.ihdovanay.myapplication&quot;
          minSdkVersion 21
          targetSdkVersion 30
          versionCode 1
          versionName &quot;1.0&quot;
  
          testInstrumentationRunner &quot;androidx.test.runner.AndroidJUnitRunner&quot;
      }
  
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
          }
      }
      compileOptions {
          sourceCompatibility JavaVersion.VERSION_1_8
          targetCompatibility JavaVersion.VERSION_1_8
      }
      kotlinOptions {
          jvmTarget = '1.8'
      }
  }
  
  dependencies {
  
      implementation &quot;org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version&quot;
      implementation 'androidx.core:core-ktx:1.3.2'
      implementation 'androidx.appcompat:appcompat:1.2.0'
      implementation 'com.google.android.material:material:1.2.1'
      implementation 'androidx.constraintlayout:constraintlayout:2.0.2'
      testImplementation 'junit:junit:4.+'
      androidTestImplementation 'androidx.test.ext:junit:1.1.2'
      androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
  }
  </code></pre>
  <p>I would be very happy if you could solve my problem.</p>