Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Missing Activity & Fragment+ViewModel template

I'm trying to get started with JetPack and MVVM and follows this tutorial : https://developer.android.com/jetpack/docs/getting-started

It states I should pick the following activity template :

enter image description here

Problem is I do not have it :

enter image description here

I did download the latest android studio version (Canary 3.3), I Invalidated and restarted, downloaded latest SDK, but without sucess.

like image 793
Sebastien FERRAND Avatar asked Sep 03 '18 10:09

Sebastien FERRAND


2 Answers

I am using android studio 3.2 stable version, and I couldn't also find "Activity & Fragment+ViewModel". But I had an option called "Fragment+ViewModel" and that generates the activity also along with the required fragment and viewmodel.

enter image description here

These are the generated files.

enter image description here

like image 145
Sonu Sanjeev Avatar answered Sep 24 '22 04:09

Sonu Sanjeev


in studio3.3 you can find Fragment+ViewModel in this version the position is File->New->Activity->Fragment+ViewModel

like image 37
朝阳杨大爷 Avatar answered Sep 23 '22 04:09

朝阳杨大爷