Loading...
Home
  • Tech Blogs
  • Videos
  • Conferences
    • Droidcon News
    • Upcoming Conferences
    • Become a Partner
    • Past Events
    • Keep Me Informed
    • Diversity Scholarships
  • Community
    • droidcon Team
    • How to Hold a Droidcon
  • Android Careers
Sign In

Global CSS

 

Important Changes in New Android Studio 4.0

Build Analyzer, Live Layout Inspector, Dependencies and other new updates and features

 

 
Elvina Sh
Marketing associate at Navigine.com — Integrated software platform for precise positioning.
Published: July 06, 2020
Tweet
Share
 

Photo by Gaspart from Dribbble

 

Hi there! I am from the Navigine team. For eight years we have been providing integrated positioning mobile technologies that enable advanced indoor navigation and proximity solutions. I wrote an article about new Android R important changes and after the release of the new Android Studio, I decided to review all the changes and new features of it. I already managed to test the new android studio, so I decided to analyze in detail each change and innovation with which we will use in the future. So let’s start!

 

Layout Inspector

This is another extra button at the bottom of the Android Studio. By the way, it looks pretty interesting and could be used for seeing the real-time changes in your device screen. Also, it has components tree column and attributes column, where you could see more details and settings of your elements. The most interesting part is to see your app’s view hierarchy at runtime with advanced 3D visualization. To use this feature, in the Layout Inspector window simply click on the Layout and rotate it.

 

Screenshot of Layout Inspector from Android Studio

 

This feature will work only if you run your app on a device with API level 30 or higher. Of course, this all looks very cool, but to be frank, you could safely do without it, so you can’t say that this is a change that completely changed the lives of developers. Even more than that, I think few people will use this, if not when creating Ui elements.

 

Build Analyzer

When using Android Studio 4.0 with Android Gradle plugin 4.0.0 and higher, the Build Analyzer window helps you understand and diagnose issues with your build process, such as disabled optimizations and improperly configured tasks. You could find it under the Build button as the last option. Here is the screenshot from Android Studio, how this element looks like.

 

Screenshot of Build Analyzer from Android Studio

 

The Build Analyzer window organizes possible build issues in a tree on the left. You can inspect and click on each issue to investigate its details in the panel on the right. Also, you could see the Warning there, in our case there are no warnings, so nothing to show.

 

Dependencies updates

There are two changes regarding the dependencies. The first one is with metadata. Android Gradle plugin starting from version 4.0.0 includes metadata that describes the dependencies that are compiled into your app. When you upload your app to the Play Console, it inspects this metadata to provide you the alerts about issues in dependencies you used in your app and to receive feedback to resolve these issues. Now, if you will decide not to share this information, you could add these extra lines to your build.gradle.

 

 

The second change is with feature-on-feature dependencies. Starting from Gradle version 4.0.0 you could include a feature that depends on another feature. For example, your app could contain two features, like a camera and audio. And there is one another feature, that depends on the camera, in this case, it should depend on the app too. Here is the build.gradleexample for video module.

 

 

CPU profiler updates

CPU profiler was added much earlier and after a time Google decided to improve it based on developers’ feedback. There are a lot of small changes, so I will not dive into each of them. Here is the list of changes added to the new Android Studio.

 

Screenshot of CPU Profiler from Android Studio

 

  • CPU recordings are now separated from the main profiler timeline to allow for easier analysis. Recorded data are organized in groups on the left side of the Profiler window.
  • For easier side-by-side analysis, you can now view all thread activity in the thread activity timeline
  • The tabs for Flame Chart, Top-Down, and Bottom-Up analyses are now in the righthand column.
  • In the Threads group, threads are automatically expanded for System Trace recordings and collapsed by default for other recording types.
  • Events are now uniquely colored for easier differentiation.
  • Threads are sorted by the number of trace events within them so that the “busier” threads are ranked higher in the list.

 

Other changes in a few words

There is a new tool for layout validation, which is a visual tool for simultaneously previewing layouts on different devices and configurations. By the way, you could do that even before, but now it’s on one page and you do not need to change the devices, definitely become better and more convenient.

 

Gif from the Android Developers website

 

Also, Google improved the code editor and it becomes smarter. Although it’s worth recognizing that the Android Studio already had a very smart editor, so now everything will become much easier and more convenient for developers.

Android Studio now added Motion Editor, making it easier to create animations. The Motion Editor provides a simple interface for manipulating elements from the MotionLayout library that serves as the foundation for animation in Android apps.

 

Conclusion

Summing up, I want to note that the new changes have definitely added more features to the developers and I hope they will facilitate the work of many. 
If there are any important updates that we didn’t write about, you can share them in the comments and tell us why they seem important and necessary for you.

 

 

Tags: Android, AndroidDev, Technology, Android App Development, Android Studio

 

View original article at: 


 

Originally published: June 08, 2020

Android News
Evolution of Android Update SystemEvolution of Android Update System
Evolution of Android Update SystemEvolution of Android Update System

By Ivan Kuten

So, how can you update Android on mobile devices? While developing software for Smart TVs and Android-based set-top boxes, we’ve narrowed it down to four ways, discarding some very exotic options:

By ProAndroidDev -
Android News
Happy Railway
Happy Railway

By Hadi Lashkari Ghouchani

This post is on the tail of Railway Oriented Programming in Kotlin by Antony Harfield. So you need to read it first and continue here. As it’s obvious I really liked it and tried it out. It needs every process have a result like

By ProAndroidDev -
Android News
Unit Tests and Concurrency
Unit Tests and Concurrency

By Stojan Anastasov

Once Retrofit added RxJava support, RxJava became my go-to concurrency framework for writing Android apps. One of the great things about RxJava is the excellent testing support. It includes TestObserver, TestScheduler, RxJavaPlugins so you can switch your schedulers in tests.

By ProAndroidDev -
Android News
When Compat libraries will not save you
When Compat libraries will not save you

By Danny Preussler

And why you should avoid using the “NewApi” suppression! The idea of “Compat” libraries was probably one of the key aspects of Android dominating the mobile space. Other than with iOS, Android users often could not update their operating system after a new version launch, simply as their phones won’t allow them to, the Android problem of fragmentation.

 

By ProAndroidDev -
droidcon News

Tech Showcases,

Developer Resources &

Partners

/portal/rest/jcr/repository/collaboration/Groups/spaces/droidcon_hq/Documents/public/home-details/EmployerBrandingHeader
EmployerBrandingHeader
https://jobs.droidcon.com/
/portal/rest/jcr/repository/collaboration/Groups/spaces/droidcon_hq/Documents/public/employerbranding/jobs-droidcon/jobs.droidcon.com
jobs.droidcon.com

Latest Android Jobs

http://www.kotlinweekly.net/
/portal/rest/jcr/repository/collaboration/Groups/spaces/droidcon_hq/Documents/public/employerbranding/kotlin-weekly/Kotlin Weekly
Kotlin Weekly

Your weekly dose of Kotlin

https://proandroiddev.com/
/portal/rest/jcr/repository/collaboration/Groups/spaces/droidcon_hq/Documents/public/employerbranding/pad/ProAndroidDev
ProAndroidDev

Android Tech Blogs, Case Studies and Step-by-Step Coding

/detail?content-id=/repository/collaboration/Groups/spaces/droidcon_hq/Documents/public/employerbranding/Zalando/Zalando
/portal/rest/jcr/repository/collaboration/Groups/spaces/droidcon_hq/Documents/public/employerbranding/Zalando/Zalando
Zalando

Meet one of Berlin's top employers

/detail?content-id=/repository/collaboration/Groups/spaces/droidcon_hq/Documents/public/employerbranding/Academy for App Success/Academy for App Success
/portal/rest/jcr/repository/collaboration/Groups/spaces/droidcon_hq/Documents/public/employerbranding/Academy for App Success/Academy for App Success
Academy for App Success

Google Play resources tailored for the global droidcon community

Follow us

Team droidcon

Get in touch with us

Write us an Email

 

 

Quicklinks

> Code of Conduct

> Terms and Conditions

> How to hold a conference

> FAQs

> Imprint

Droidcon is a registered trademark of Mobile Seasons GmbH Copyright © 2020. All rights reserved.

powered by Breakpoint One