No android menu group in android studio 3.0 - android-studio

I've updated android studio to 3.0 and android group disapeared from tools menu.
I have SDK installed
I need android studio for ionic - I'm beginner and don't know that tool

As far as I can determine (by experimenting) group and barriers are not supported in Constraint layout 1.0.2 which is what is used by default in Android Studio 3.0.
That is the the latest version of Constraint layout didn't ship with the latest version of Android Studio.
It is still in beta - beta 3 released on Oct 12th.
If you want to use it
open the projects build.gradle file and change it to read:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.0-beta3'
Only the last line needs changing i.e. from 1.0.2 to 1.1.0-beta3. You will need to resync the project and then you will see group and barriers in the right click context menu.

Related

How do I work out what version of IntelliJ a particular version of Android Studio is based on?

How do I work out what version of IntelliJ a particular version of Android Studio is based on? I had a look in the "About Android Studio" window and all I see is the following information:
The first three groups of numbers of the Android Studio build are the version of the IntelliJ Platform build that the Android Studio build is based on: 213.7172.25. The first two digits indicate the year: 2021. The third digit indicates the release number: 3. So it is based on the 2021.3 version of the IntelliJ Platform.
See also: https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html#build-number-format
The Android Studio version name (e.g. "2021.3.1") encodes what version of IntelliJ it was based on, as follows:
<Year of IntelliJ Version>.<IntelliJ major version>.<Studio major version>
As described in the "New versioning scheme - Android Studio" section of the Announcing Android Studio Arctic Fox (2020.3.1) & Android Gradle plugin 7.0 Android Developers Blog post:
The first two number groups represent the version of the final IntellIj platform that a particular Android Studio release is based on (earlier canaries may still be on the earlier version). For this release, this is 2020.3.
The third number group represents the Studio major version, starting at 1 and incrementing by one for every major release.
So "2021.3.1", for example, encodes that this version of Android Studio is based on the "2021.3" version of the IntelliJ platform.

Android Studio Designer Preview went Black after implementing Material Components library

I am new in Android Development. In the latest version of Android Studio I want to use Material Components for my app. But after implementing its gradle script my Android Studio Designer Preview went black/blank. As you can see in screenshot below.
I have implemented the following line in my build.gradle
implementation 'com.google.android.material:material:1.4.0'
After removing the material components library the preview looks as it should.
I have also tried to restart Android studio as well as my computer.
I just realised that I have used
implementation 'com.google.android.material:material:1.4.0'
instead of
implementation 'com.google.android.material:material:1.4.0-rc01'
Now the issue has been fixed.

Import Unity project in already built Android Project

I have created an Android application in Android Studio and Unity. I can start UnityPlayerActivity from other activities in Android Studio. Now, I updated the Unity project and the scene in Unity and I want to start this updated Scene/Activity in the already built Android Project.
I don't want to create a new Android Studio project from Unity by exporting and then copy the other older files in the new project. This process can be very tedious and also VCS with GitHub would be another challenge. There are more than 40 files in my current project and just because of 1 update in Unity Project, I don't think creating a new project is worth it or something I would like to do.
Some suggestions which I already have are:
Export from Unity again and copy-paste all the files created in the older project from Android Studio.
Create a library and import this library in Android Studio (I am not very clear how this works but I don't think this will work because of the limited scope of a project).
So, is there any way such that I can export an Activity from Unity and start the new Activity in Android Studio?
Any help is appreciated and thanks in advance if anyone can solve this for me.
The cleanest way would be to convert the exported Android-Project into a library.
Remove the activity from src/main/AndroidManifest.xml
Modify build.gradle
Change apply plugin: 'com.android.application' to apply plugin: 'com.android.library'
Change implementation fileTree(dir: 'libs', include: ['*.jar']) to api fileTree(dir: 'libs', include: ['*.jar'])
Remove all the bundle {...}-stuff
This should enable you to build a .aar-File which you can use in your native Android-Project.
Depending on your Unity-Version (and packages) other modifications could be needed, but that will be pointed out by errors in AndroidStudio when building the library.
The modifications are based on this article and complemented for Unity 2017.4.
The newest Unity beta (2019.3) also supports creating a library directly from Unity. But I would not recommend using a beta in production.

Why does gradle have 1:1 mapping with android studio versions

Recently I upgraded Android Studio 3.0 Beta 7 to Android Studio 3.0 RC 1. The dependancies in build.gradle also got changed from classpath 'com.android.tools.build:gradle:3.0.0-beta7' to classpath 'com.android.tools.build:gradle:3.0.0-rc1'
Gradle is a build tool managed by entirely separate organization, separate community. Then how come gradle make their releases with android studio?
In fact, gradle does not have 1:1 mapping with android studio versions. There is no relationship between gradle and android studio versions.
com.android.tools.build:gradle is a gradle plugin for Android developed by Google team.From here, you can see the plugin requires gradle version.For example, if the plugin version is 2.3.0+, you should use gradle whose version is 3.3+.In addition, you can check gradle version in rootProject/gradle/wrapper/gradle-wrapper.properties
In your case, you can also downgrade 'com.android.tools.build:gradle:3.0.0-beta7' to 'com.android.tools.build:gradle:3.0.0-rc1' and it can works. However different plugin version, different performance.

Android Studio 1.3 Preview NDK support

Yesterday Google announced that native code debugging is now possible with this version of Android Studio.
https://plus.google.com/+AndroidDevelopers/posts/2Gk6yrZKV4X
I've updated to the newest build version "AI-141.1962279" and can't see any possibility of debugging native code.
I've switched to build-tools 23.0-rc1, used gradle plugin 1.3.0-beta1 but cannot set breakpoints in native code or step into JNI calls.
Is it really working?
July 10th update Android Studio Preview with NDK support is available : https://sites.google.com/a/android.com/tools/tech-docs/android-ndk-preview
Android Studio 1.3.0-Preview is indeed available through the Android Studio "Check for updates" menu.
Unfortunately, all C++ features aren't available yet in this preview. They will be available in about 2 weeks.
Source : Google IO dev tools keynote at 35:38
Android Studio 1.3 Beta Available
posted Jun 19, 2015, 11:37 AM by Tor Norbye
Android Studio 1.3 Beta is now available in the beta channel! Sorry, this build does not yet contain the C/C++ support; we are still ironing out a couple of critical issues, but we hope to be ready in the next week or two. Similarly, the vector rasterization support is also still not enabled due to various bugs.
UPDATE:
the 9th of July update contains c++ debug
http://tools.android.com/recent
Even on the Canary Channel, the latest currenlty available build is 1.2.1.1. We will simply have to wait a bit longer for 1.3. The "About Box" in Android Studio also displays the version number; check that to be sure.
"As announced at Google I/O, Android Studio 1.3 will include C/C++ support as well, but that is not included in the first couple of preview builds."
Source:
https://sites.google.com/a/android.com/tools/recent/androidstudio13preview1available
FYI:
NDK support is included from Android Studio 1.3 RC1 on. This includes editing running and debugging C and C++ code. See Android NDK Preview and experimental Gradle plugin guide.
with Android Studio 1.4 release you could debug native JNI code. Your project need to use gradle plugin com.android.model.application though.
After you create a project with JNI code in it, this Android Studio version will create a debug Configuration (mine is called app-native)
once you select this configuration, you could set breakpoint in JNI code
then run your app with android studio [it will download and start app on device]
When JNI code is launched, Android Studio will break right away. You could set more breakpoint at this moment too
Then let debugger "go" [to continue ]
Your breakpoints will get hit
The gradle model plugin examples could be found from googlesamples/android-ndk on github. There is a youtube clip called HelloJniWithAndroidStudio shows how to create a hello-jni with android studio 1.3, most steps still work for 1.4 -- it might help for build.gradle creation.
Different version of gradle mode plugin requires different gradle version:
Gradle-Model-Plugin-version 0.2.0 works with Gradle Version 2.5
Gradle-Model-Plugin-version 0.3.0-alpha3 works with Gradle version 2.6
you could find out what versions are available from the jcenter links mentioned earlier.

Resources