Android Studio 3.5 deploy issue on my smartphone - android

I have just updated my Android Studio to 3.5 and I am starting to use the new "Apply Changes" feature. I can deploy my apps without problems using AVD, but when I use my smartphone (Galaxy S9+ with Oreo) the process keeps crashing and all the times I have to kill manually the app and click Start.
I've already tried to create a new project, kill all the apps, plug & unplug the USB cable and restart my device. I tried also Invalidate cache/restart and clean project.
This is the error that the IDE gives me:
E/zygote64: Bad JNI version passed to GetEnv: 805372416
E/studio.deploy: Error retrieving JVMTI function table.
Changes were not applied.
We were unable to deploy your changes: MISSING_AGENT_RESPONSES
Thanks for your help
After contacting the Google Team they have opened a new issue, here's the link if you want to stay updated: https://issuetracker.google.com/issues/139942372
UPDATE: Google has marked this issue as fixed, I think that in the next update everything will be fine.

If this is happening with a plain project, my guess is that there is some incompatibility between your device and the "Apply Changes" feature in Android Studio 3.5.
This issue seems to match your symptoms. Keep an eye on it, and with luck this will get fixed in Android Studio 3.5.1, either by fixing the IDE or at least detecting that "Apply Changes" will not work and reacting better.

Related

Android Studio : The application could not be installed: SHELL_UNRESPONSIVE

i'm trying to install my app debug from my android studio. it's work well yesterday, but today when i try to install it again, the application cant be installed on my device and showing error like below on my android studio.
Installation did not succeed.
The application could not be installed: SHELL_UNRESPONSIVE
The device timed out while trying to install the application.
Retry
what should i do? i tried install on other device, and it worked fine. My device is Redmi 4X and other device is Samsung J3
Faced the same issue, not sure of the reason but in Android studio, Click on the File -> Invalidate Caches/ Restart and then it starts to work.
I got same issue with my device. i restart my device and its work properly.
The problem is because you don't have the proper SDK for the Android version. I'm telling you because a month has passed for me too. The solution is to download the appropriate pack in the SDK Manager.
If you have doubts how to enter:
Close the project.
In the welcome panel click on settings, then choose the SDK Manager option.
Click show package details and select the version for Android and choose all packages.
Finally you click ok XD
Try this method if it works perfect greetings
If other answers didn't help and previously application was installing correctly on your device, try to check your AndroidManifest file. Check that nothing forbids to install your app because of os version conflict or manifest merging errors or other reasons.
I came across this problem recently, through process of elimination I determined the cause was related to dependencies in the build.gradle(your app name).
I suggest working backwards and comment out everything that was added since the last known working build/install.
In my case I have a legacy app developed back in 2016 being rewritten, dependencies for signalR have changed quite a bit since then, the original libs where causing the install to fail while everything else seemed excellent, not even a single build error was occurring. Commenting out the libs and references got the application to a runnable state.
In my case, I deleted the emulator and recreated it. It solved the issue.
Before this, I had already tried following which did not work for me:
From menu: File->Invalidate cache/restart.
Deleting .cxx, .idea, .gradle, build folders and rebuilding.
Cold boot device emulator
Posting this in case someone is trapped in my kind of situation.

Timed out waiting for process to appear on device

I am having the following problem when running or debugging apps on a device or emulator with Android Studio. The application is installed but it is not started on the device (or emulator). In the Run window I can see the following:
Launching app on device.
Waiting for process to come online...
and after some time I see the following:
Timed out waiting for process to appear on 'device'...
I have attached a screenshot that shows the problem.
The problem started recently. I am using the latest version of Android studio (3.5.1) and a Google Pixel device running Android 10 but the problem happens on emulators and other devices running previous versions of Android. The problem also happens on two different computers, with different Android applications and devices - the common factor is Android studio. Finally, the problem seems to have started after I updated Android Studio to 3.5.
Does anyone know how to fix this problem? I have tried many things (clear cache, rebuild, invalidate and restart, etc) without success.
Any ideas?
You mentioned that restarting Android Studio didn't work for you...but it worked for me...
File > Invalidate Caches / Restart... > Just Restart
Android Studio 3.6.2
Build #AI-192.7142.36.36.6308749, built on March 18, 2020
There is a bug in the recent Android Studio release. You can revert to previous version or test it from command line.
For me the problem was that I accidentally removed the Launch of the Default Activity in the "Run > Edit Configurations..." option.
Just insert the "Default Activity" under "Launch Options" and your application will run again on your device.
For me, it took marking the build as "debuggable" in the application build.gradle file.
For example:
android {
//...
buildTypes {
// ...
releaseStaging {
debuggable true // <- add this line
signingConfig signingConfigs.release
applicationIdSuffix ".releaseStaging"
versionNameSuffix "-STAGING"
matchingFallbacks = ['release']
}
}
}
Remember to remove this before building release APKs though!!!
Even if I faced the timed out issue in one plus and followed steps that fixed for me.
Go to the respective app
Hold for 3 sec > App info> permissions> allow for storage>.
Next, go to adv settings> battery opt > check "Don't optimize.">
Come back and scroll down > display over other apps> enable....
Hope this helps.
I managed to fix the problem by uninstalling Android studio, deleting all relevant files in the user folder (including gradle cached files) and installing the latest version of Android studio. The problem seems to have been fixed after several months. Note that I am now using Android Studio 4.1.
Hey I had this same problem recently, I tried re-starting adb server but no luck, however when I uninstalled the APK present on my device. Then everything was back to normal.
When I tried to run it on a emulator which didn't have application already, it worked perfectly fine.
Hope this helps :) Thank You.
I tried most of the answers from here and on YouTube. What worked for me is updating my Android studio to the latest version; 4.0.
Everything was working fine for me, when I started getting the error described in this question. So I created and started using a different virtual device for the emulator, and it didn't have the problem.
I was using debugging over Bluetooth.
Giving Location permission to the WearOS app on my phone solved the problem for me.
(Bluetooth scan access is restricted in the modern android versions unless fine Location permission is granted)
In case it can help someone...
try one of the following:
Make sure device is not connected the same time via data cable and wifi
2.If you are connecting through wifi, try to connect via data cable.
3.Check maybe your device has some component or anything maybe like fingerprint interfering with the connection.
When these errors occur:
Message in Run
No communication with Run (stacktraces, System.out ...)
No restart button
Install the newest Android Studio version
Try on different virtual devices, some of them are glitched

Xamarin no longer debugging my app

I've been working on a Xamarin project for a few days and have been testing it fine, but today it has suddenly stopped allowing me to debug the app, either via Live Player, or by connecting my smart phone via USB.
The only error I am getting, as far as I can see, is
Failed to debug your app
I've not got a way of testing it on iOS devices, but the built-in Windows Phone emulator runs the app fine, albeit with an error in my code popping up now and then.
What could be causing the Android version to stop debugging, or how do I at least fix it?
There are a couple of steps that can help with that issue:
Clean the solution and exit visual studio
manually delete the .vs folder in your solution directory
Delete the /obj and /bin folders in your shared code, and in each project for the platforms you are using
if you are developing for iOS, sometimes it helps to restart your mac
Start Visual Studio
Rebuild your shared code project
Rebuild every native project
Beyond that also make sure that you are using the latest versions of Visual Studio, Xamarin and Xamarin.Forms on all your computers, and that the nuGet Packages your project is using are at the very same version each in shared and native code
Also check, if your app isn't throwing an unexpected exception during its initialization. Especially if not caught, it can happen that your app crashes before your code gets executed at all.
In addition you may find further information about what is going on at Help -> Xamarin -> Open logs or in the device management in XCode (iOS only)
Try this :
Close visual studio if open.
Open App Data and then go to
(a) Local\Xamarin
(B) Local\Xamarin\Xamarin.Android
Empty these folders.
Open your project and then try to build your application.
Not a proper solution, but I uninstalled and reinstalled Visual Studio. This seems to have fixed the problem, but I've still no idea why it stopped working in the first place.

cant find device even it is connected after xamarin vs crashed

My Visual Studio instantly crashed and after it restarted it is asking for xamarin to be installed. I declined it since I am already using xamarin before it crashed but after that, I saw my main project was unloaded so I tried to load the project again and succeed. But what is so weird is I can't see my device now or even the default emulators for deployment, only start. How to fix this issue?
I saw an answer from xamarin forums - https://forums.xamarin.com/discussion/10558/xamarin-android-toolbar-does-not-show-connected-devices and it solved my problem.
It seems that the main project after crashed and restart lose the target as start up project.
This is the part of copied answer
Start Windows Visual Studio
Open the project
Set the Android project as the start up project
The device should appear or select it Visual Studio > Menu > Target Android Device
Hope that helps, im using a Samsung Galaxy III

Android Studio 0.8.1 can no longer install app. waiting for device

I upgraded to the latest android studio and as ever it breaks what was working fine before.
If I plug in my android device I can see debug in the debug monitor, it gets detected and i can select it as a device to deploy to, then I get
Waiting for device.
Target device: xxxxxxxxxxxx
and nothing else happens.. VERY frustrating. Anyone any ideas on how to resolve?
Here is the resolution:
The problem is the way i installed the newer version of Android Studio. Do not install it over your previous installation directory. Create a new directory and move over your SDK into it. This is how I resolved it.
The only error I was eventually able to get from Android Studio was if i tried to run a test I'd see
NoSuchMethodError: com.android.builder.model.AndroidArtifact.getOutputs()Ljava/util/Collection;: com.android.builder.model.AndroidArtifact.getOutputs()Ljava/util/Collection;
there has been some other posts referring to this issue. Just make sure you do a clean install and don't crap over your older version.
This issue on the AOSP bug tracker tells you what is going on. A quick fix is getting rid of builder-model-0.11.0.jar from plugins/android/lib in your Android Studio folder. A patch has already been submitted and this probably won't happen again with the next update.

Categories

Resources