Android Profiler stuck in loading - android-studio

I am trying to opening Profiler but it's not working as it stucks in loading, I have Android Studio 3.3.
Profiler stuck in loading
I am using this real device..

If your platform-tools's version is 29.0.3 on Android Studio 3.5, please rollback version to 29.0.2.
I found it in google issue tracker
https://issuetracker.google.com/issues/140822450
I can confirm that downgrading to version 29.0.2 fixed the issue of not founding devices in the Android Profiler. You can download that version from here: https://dl.google.com/android/repository/platform-tools_r29.0.2-darwin.zip. Unzip it in your Android SDK folder.

Click on the '+' (see image) signal!
This worked for me on Android Studio 3.5.1
with platform-tools's version 29.0.4
For me it was also showing the loading gif but just click on the '+' button and select your android!

I had the same problem for Android Studio 3.5.3, but I used a device on android 8.0, which is supposed to work fine with profiler, unlike 4.4. What I had to do was to update the platform tools from 29.0.2 to 29.0.5 and it finally started to work. You can find it in Tools - SDK Manager - Android SDK

that's because the profiler doesn't work with API 25 or lower levels.
when you are trying to start profiler you should see this message from Android Studio
or you can check the Event log, and you'll see this message
Startup CPU Profiling: Starting a method trace recording on startup is only supported on devices with API levels 26 and higher.
so all you need is to change the phone which you are working on but be Ensure that have API Level 26 or higher.
when you change the API to higher one Ensure to do these Steps:-
disable instant Run from File > Settings > unmark enable instant run...
Enable advanced profiling from app > Edit Configuration > profiling > then mark on "like the image blew" ...
Enable Advanced Profiling.
Start Recording CPU Activity on startup.
NOTE: YOU WILL FIND " APP " ON THE TOOLBAR.
finally, plug in your new device which has a higher API and start working on your app.

I faced the exact problem. Because I tried to use Profiler in lower API level of Android. In my case it was API level 19 (KitKat).
Pre-Lollipop devices aren't supported by Profiler
Use the later (>21) or latest version of Android Devices for Profiling App
It worked for me.

I had the same probleme, i fixed it by changing the targetSdkVersion to the version of my phone.
I had targetSdkVersion to 29 and the profiler wasn't loading.
Then i changed it to 28 that is my phone sdkversion then it worked fine.

Related

Android studio 4.1 Emulator extended controls

Extended control settings/options are missing in this update? like sending sms, gps settings unable to find the settings any help appreciated.
To see the additional options you need to run the Emulator in a separate window (process).
To do so go to File...Settings... and then choose the following.
You'll need to uncheck the Launch in a tool window option.
After you do that and restart Android Studio and start your emulator, it will run in a separate window and you'll see the options you want on the ellipse menu item on the side of the emulator.
Here's my Android Studio version info:
Android Studio 4.1
Build #AI-201.8743.12.41.6858069, built on September 23, 2020 Runtime
version: 1.8.0_242-release-1644-b3-6222593 amd64 VM: OpenJDK 64-Bit
Server VM by JetBrains s.r.o
Linux 5.4.0-52-generic
Current Desktop: ubuntu:GNOME
Edit: September 2021
Now, since Android Studio Arctic Fox (2020.3.1) you can enable that in settings:
And you have it there:
Old answer
TL;DR
Currently, you can't use
Why
Base on documentation:
https://developer.android.com/studio/run/emulator#limitations
Limitations
Currently, you can't use the emulator's extended controls when it's running in a tool window. If your development workflow depends heavily on the extended controls, continue to use the Android Emulator as a standalone application. In addition, certain virtual devices—such as Android TV and foldable devices—can't be run in Android Studio because they have specialized UI requirements or important functions in the extended controls.
After hours of struggling, I finally started my emulator using terminal-command and I was able to see the extended controls. Followed this answer, https://stackoverflow.com/a/45201495/6869086

Have adb.exe at specified location but still have "adb.exe is obsolete and has serious performance problems" dialog box

I have the adb.exe at "../AppData\Local\Android\Sdk\platform-tools\adb.exe" and even checked the virus chest of antivirus everything is fine.
But still get the dialogue box saying
"adb.exe is obsolete and has serious performance problems".
What worked out for me was after
Create Virtual Device
Choose a device
select Q API Level 29 image with target as Android 10.0 (Google APIs)
not just Android 10.0
and proceed as usual.
Hope its useful for you!
Maybe a bit late but the accepted solution didn't work for me. However the following did:
SDK Manager -> SDK Tools
Delete current Android SDK Build-Tools even if it is the latest version. In my case, I observed it also uninstalled a lot of previous versions
Restart Adroid Studio
Install the latest Android SDK Build-Tools
Restart Adroid Studio
I suspect the problem happened due to some sort of error in incremental updates of adb

Visual Studio Mac Won't Show iOS Simulators

I've got a Xamarin Forms solution with iOS and Android projects. The iOS side was working, I switched over and did a bunch of work on the Android side. Now I need to do some more iOS stuff (push notifications) and I can't get the iOS Simulator to kick in. Xcode is installed, VS says it can see the SDK. I can open the simulator from XC but inside VS no matter what Debug combination of the .iOS project I select all I get is "Generic Simulator". Any ideas?
Try Unload the IOS Project and Reload and Set as a Startup Project, it works for me
See the answer in the comment provided by #lowleetak:
Is the minimum supported version in Info.plist less than or equal to
the version of iOS Simulator that you have?
This was the issue. The project settings listed 10.2 as the target SDK but the info.plist file had 10.3 which wasn't installed on the machine via Xcode. The machine has Xcode 8.2.1 and iOS 10.2 installed.
Additionally there's now a bug opened about this behavior. If the two fields are going to allow different values there should at least be a warning next to them about the mismatch.
I also showed Generic Simulator only on my project after updating to XCode 14 early. At the release of XCode 14 the stable Visual Studio for Mac (Xamarin) release did not yet support this version of XCode. Even the preview channel was not yet ready. Guidance from Xamarin.iOS discussion group was that the special XCode14 channel could be used to evaluate. https://github.com/xamarin/xamarin-macios/issues/15954

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.

livecode Installing app on target - Android

I have a very simple test that I am doing in Livecode Community 6.5, on Windows 8.1.
I have created a button which shows a dialog window when clicked on.
When I run the test in an emulator, the dialog window Standalone Builder Progress reaches the stage "Installing application on target device and then" gets stuck.
Each time I have to terminate LiveCode in the Task Manager. I have tried changing the device but got the same results.
From Android Studio I can see the device when I start AVD.
Make sure that the Platform version of the AVD is the same or higher than the Minimum Android Version in the Standalone Application Settings of your stack.
Try in addition to:
install the latest stable version of LC 6.6.2 from here: LC downloads
make sure you have the Android SDK running with SDK Tools revision 22.6.3 (rev. 23 may not work properly and needs some workaround)
try with using Android 2.3.3 (API 10) - install both SDK Platform and Google APIs
in the Standalone Settings select "Sign for development only" and "Allow External Storage"
if you changed the "Identifier" (default shows as "com.yourcompany.yourapp"), make sure that its contents does not contain any "-" and "&" since they are not working there; possibly change to default.
create a standalone android app (apk) and try to install it on a real device
Thank-you to everyone who helped.
I think 2 things have to be there in order for it to work.
unique Identifier & external storage
Thanks

Resources