I'm using the latest version of Android Studio and recent SDK tools and I'm following this guide to create a sample Jetpack app, but the Create Project wizard in my Android Studio does not have an option called Activity & Fragment + ViewModel and related configuration to create a Jetpack app (Tested on Linux). Any ideas?
Additional info:
Android Studio version: 3.1.2
Build your first Jetpack app
Launch Android Studio 3.2 or higher, and enter information in the Create Android Project and Target Android Devices as always.
I'm on Android Studio 3.3.1 in Linux and also not getting Activity & Fragment + ViewModel as an option in the Wizard. However I have a work around.
The Activity & Fragment + ViewModel code snippet shows up once you've created a project.
So create your new project with an Empty Activity. Right click inside the file view. Click on: New -> Activity -> Activity & Fragment + ViewModel
Then you can continue with the rest of the Jetpack tutorial.
Related
Android Studio 3.3 (Canary 12) does not have an option called "Activity & Fragment + ViewModel" and related configuration to create a Jetpack app (running on Windows 10).
Any suggestions?
This is a late follow-up, but I am experiencing the same bug on the now stable version 3.3 of Android Studio ("Activity & Fragment + ViewModel" does not appear on creation of a Jetpack application).
My current workaround is to create an application with "No Activity" and add the activity after the project has been created by going to New -> Activity -> Fragment + Viewmodel and adding it that way.
I assume it is a bug, not a feature and am looking for other posts about this issue. Not sure if Google is aware of it.
Screen Shot #1 - Android Studio Project Gradle Build View
Screen Shot #2 - Android Studio Project Gradle Sync View
Going through the "Android Studio 2.2 Development Essentials book" and following along with the tutorial in chapter 3. Everything was OK until I completed a task in the Development Essentials book (chapter 3, page 24 in book) that said,
As we can see from the component tree hierarchy, the user interface
layout consists of a layout parent with a single child in the form of
a TextView object. If Android Studio has used a RelativeLayout manager
for the project, the first step is to convert it to a
ConstraintLayout. ConstraintLayout is a new and flexible layout
manager that is used in most projects in this book. To achieve this
conversion, right-click on the content_android_sample entry in the
Component Tree and select the Convert RelativeLayout to
ConstraintLayout menu option as shown below:
Upon completion of the above quoted tutorial task (in chapt. 3 of the Development Essentials book), an error was presented that said:
Error: Failed to resolve: com.android.support.constraint:constraint-layout:1.0.0-alpha1
Also, a rendering error was listed as well that said:
Rendering Problems The following classes could not be found:
- android.support.constraint.ConstraintLayout ( Add constraint-layout library dependency to the project, Fix Build Path, Edit XML, Create Class)
Any thoughts on how to fix this? Please see screen shots attached (above). I'm new to Android Studio.
Thank you very much for your time.
I am using the following OS and Android Studio version below:
Win7 professional 64 bit OS
Android Studio 2.2
Build# AI-145,3330264, Built on October 6, 2016
You need add check in..
exist a icon with name "SDK Manager" just click
open Settings -> Appearance & Behavior -> System Settings -> Android SDK -> SDK Tools
And in this dialog add:
ConstraintLayout for Android
Solver for ConstrainLayout
Then, here only you need close and open Android Studio.
Maybe only you can update to:
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha8'
Or update your dependency to:
compile 'com.android.support.constraint:constraint-layout:latest_version'
This should solve your error. Go to your build.gradle and change your implementation 'com.android.support.constraint:constraint-layout:1.0.0-beta7' to implementation 'com.android.support.constraint:constraint-layout:2.0.0-beta7' or to any latest
I am trying to understand on how to build a shell component native code on Android with MFP 7.1 using Android Studio instead of ADT.
I got the MyProject/components/ShellComponent/android/native folder created after build the component, but there is no option to Run As > Android Studio project. I wanted to add Java classes to run under src. The ADT version uses a separate project tree, but with Android Studio, there is no separate tree.
I also tried to open native folder as an Android Studio project and it shows an empty project.
I ran the ShellDevelopment sample on Android Studio and it works fine.
Open the project in Eclipse -> Right Click on Android environment -> Run As -> Android Studio Project. When Android Studio is opened DON'T MIGRATE PROJECT TO GRADLE!
Anyway it is not recommended! if you want to make changes - use Eclipse to make these changes.
I'am insatlled RoboVM module. introduced a license key.
How to create RoboVM iOS APP in Android Studio?
Make sure you have Gradle installed in your Android Studio.
Start libgdx setup GUI tool
java -jar ~/Downloads/libGDX/1.6.1/gdx-setup.jar
Make sure to select IOS project.
Click generate
When it finishes, import libgdx project into your workspace (File->Import->Gradle)
Connect your device to your machine (if you don't want to use simulator)
Right click on the IOS project and select Run As IOS Device Application (or IPhone/IPad Simulator Application. Whichever suits you).
I have already an Android app in Android Studio and i am trying to make it Android TV compatible. Therefore, i tried to create an Android TV activity (that is using the Leanback support library) using the new activity wizard (File -> New -> Activity -> ANdroid TV activity). The wizard is finishing successfully but the project is full of errors! I am attaching a screenshot with the errors.