WB How to make use of Android Studio Profile?

Asked

Viewed 39 times

-1

When we are working on Android development with Java or Kotlin usually it is using a feature similar to Listview, but on Android devices if the list is too large the application starts to load too much the phone device memory, to get around this problem is used a library called Recyclerview.

In order to be able to analyze the load in memory is necessary the Profile feature of Android Studio as shown in the image below.

inserir a descrição da imagem aqui

When this button is triggered the application should be executed in a Profile module, and only then it would be possible to check if there is not too much memory loading. I tried to perform a test in the application of this class by placing 10 thousand records and not being able to trigger the Profile because of this error message.

inserir a descrição da imagem aqui

There is a way to use the Profile button in Flutter applications?

1 answer

1


You could try to understand the error message first, right? If it is in English, try to translate it...

In English:

Exception: Profile mode is not supported for emulators.

Translating to English:

Exception: Profile mode is not supported in emulators.

I went and tested, I ran Profile Mode (PF) on an Android emulator and got the same error as you, so I plugged in my phone and tested it, and look at it, it worked right:

Profile Mode

Remarks

With Flutter you can also use the Devtools to check what you want, as it brings a better detail.

If you want something like RecyclerView of the Native, use the ListView.builder, and a little look at the property as well addAutomaticKeepAlives.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.