After updating Flamingo to Giraffe Android studio. There is no options for compose activity in a New Project.
Android Studio Giraffe | 2022.3.1
Build #AI-223.8836.35.2231.10406996, built on June 29, 2023
Runtime version: 17.0.6+0-17.0.6b829.9-10027231 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 13.4.1
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 16
Metal Rendering is ON
Registry:
external.system.auto.import.disabled=true
ide.text.editor.with.preview.show.floating.toolbar=false
Non-Bundled Plugins:
idea.plugin.protoeditor (223.8214.6)
New Project window

What setting should I have to add in here?
You literally have it selected - that's the Compose icon in the middle of Empty Activity template. With Giraffe, the default template uses Compose (and you'd need to use the "Empty Views Activity" template to get the previous behavior).
The "Empty Activity" is @Composable by default in Android Studio Bumblebee (2021.1.1) and later. So the template you're looking for is Empty Activity.
Probably like you, since that activity description is not very informative I also thought it was just completely empty. Instead, when I created a new project with the Empty Activity I got this:
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
MyAppTheme {
// 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() {
MyAppTheme {
Greeting("Android")
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With