Sultan Garushe
Sultan Garushe

Reputation: 1

Unable to View code changes in android studio Koala/2024

I have been using an Android Studio Koala | 2024.1.1 Patch 2. my problem is that i do have Relativelayout code written in xml in my training manual. when i try to run the code on my device or emulator the code changes will not apply or viewed on them. Because this version of android studio didn't have layout resource file, i have created one and pasted it in 'activity_main.xml' file, as per the suggestion from the training. can anyone help me on this? are there different method in compose or Kotlin that is new to this version of android studio? or is this any kind of other problem? here is the screenshot.

i tried a number of suggestions related to creating a new layout folder and pasting it but didn't work

Upvotes: -1

Views: 582

Answers (1)

Ajay S T
Ajay S T

Reputation: 1

Nothing is clear but I can share some things,

Because this version of android studio didn't have layout resource file

  1. You are definitely running a Jetpack Compose Project
  2. To make sure of that, check the class extended in MainActivity, if it is ComponentActivity() then it is Compose or if AppCompatActivity() then XML based project.
  3. You can still use/follow the old way with XML, just create a new Activity: AppCompatActivity() class and layout folder in res folder

Upvotes: 0

Related Questions