Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android studio 3.0: Studio Profilers encountered an unexpected error

My application runs perfectly.

But my logcat give an error every time when I run my application:

12-11 20:45:42.539 946-1547/package E/StudioProfiler: Studio Profilers encountered an unexpected error. Consider reporting a bug, including logcat output below.

See also: https://developer.android.com/studio/report-bugs.html#studio-bugs

Failed to capture application

What's this error means?

Why it's occurred every time?

I am using Android studio 3.0.1 and Gradle 3.0.1 .

like image 294
Mitesh Vanaliya Avatar asked Dec 14 '17 07:12

Mitesh Vanaliya


3 Answers

However, not all profiling data is visible by default. If you see a message that says, "Advanced profiling is unavailable for the selected process," you need to enable advanced profiling in your run configuration:

  1. Select Run > Edit Configurations.
  2. Select your app module in the left pane.
  3. Click the Profiling tab, and then check Enable advanced profiling.

Reason:

I thing when you disable the option your Garbage collection events in Memory Profiler are cleared and then when you run build it works perfectly.

like image 153
stefan Avatar answered Oct 20 '22 00:10

stefan


However, not all profiling data is visible by default. If you see a message that says, "Advanced profiling is unavailable for the selected process," you need to enable advanced profiling in your run configuration:

  1. Select Run > Edit Configurations.
  2. Select your app module in the left pane.
  3. Click the Profiling tab, and then check Enable advanced profiling.

Reason:

I thing when you disable the option your Garbage collection events in Memory Profiler are cleared and then when you run build it works perfectly.

like image 1
youpilat13 Avatar answered Nov 13 '22 08:11

youpilat13


Please check in logcat below things but before that you can see this first:

Try to Enable advanced profiling:

Select Run > Edit Configurations.

Select your app module in the left pane.

Click the Profiling tab, and then check Enable advanced profiling.

1) Please select your mobile device/emulator first on which you run your application( In your first spinner view).

2) Please select your application package which you run in mobile/emulator in second spinner view.

3) And Third options has some pre-defined tag like verbose,debug,info,error and so on.Please select verbose so you can see each and every log of your applications.

If above thing is not useful then please restart your studio once or invalidate caches and restart to check once again above all option revise.

And Please check below is not written into progard config for Android:

-dontskipnonpubliclibraryclasses
-dontobfuscate
-forceprocessing
-optimizationpasses 5

-keep class * extends android.app.Activity
-assumenosideeffects class android.util.Log {
    public static *** d(...);
    public static *** v(...);
}

Hope it helps you and solved your problem.

like image 1
Jyubin Patel Avatar answered Nov 13 '22 06:11

Jyubin Patel