Installation challenges of Android Studio Flamingo Patch 2 - Plugin Error

134 Views Asked by At

I am trying to get installed android studio flamingo patch 2, updated from Android Studio Chipmunk up and running. I got a plugin error related to difference between the installed IDE and Build.

Screen shot 1

I also followed AGP Assistant guide as shown by the screen shot1 where I changed the detected JDK 17 to JDK 20 and Gradle Plug from 7.2.2 to 7.4.2:

Screen shot 2

After the updates I am getting these two errors, Unsupported Java (see screen shot 3) and Bug error (see screen shot 4).

Screen shot 3 Screen shot 4

Any assistance on how I get the IDE working properly when I try to compile the empty compose activity template running. Below are my gradle scripts and the empty compose activity template code,I am trying to debug. (My Level of Android Developer = Beginner)

// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
    id 'com.android.application' version '8.0.2' apply false
    id 'com.android.library' version '8.0.2' apply false
    id 'org.jetbrains.kotlin.android' version '1.7.20' apply false
}
```
package com.example.composedemo1

import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import com.example.composedemo1.ui.theme.ComposeDemo1Theme

class MainActivity : ComponentActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContent {
            ComposeDemo1Theme {
                // A surface container using the 'background' color from the theme
                Surface(
                    modifier = Modifier.fillMaxSize(),
                    color = MaterialTheme.colorScheme.background
                ) {
                    Greeting("Android")
                }
            }
        }
    }
}

@Composable
fun Greeting(name: String, modifier: Modifier = Modifier) {
    Text(
        text = "Hello $name!",
        modifier = modifier
    )
}

@Preview(showBackground = true)
@Composable
fun GreetingPreview() {
    ComposeDemo1Theme {
        Greeting("Android")
    }
}

```
type here
```
`



 

0

There are 0 best solutions below