When trying to run the app on the device, I'm facing the following issue:
I the Event Log, there is the same message:
Where can I find more info about the error?
Might work if you Clean the project or rebuild the project and if you launching in emulator uninstall from the emulator or from mobile.
UPDATE:
i think there will be no more information about the error...
It's our common mistakes.
As per my knowledge about this issue there can be a few reasons for that:
First is that your app is already installed with the same package
name but with different certificate, To resolve this check if your
phone has that app already installed then uninstall it and try to
install new one.
The second reason can be that you are trying to install the
application that has minimum SDK version higher than the Android
version of device. To solve this make sure that the minimum SDK
version defined in your project's "build.gradle" is lower than the
Android version of your device.
Turning off the Instant run removed error for Android Studio 2.3.
sometimes project location contained the special character.
Example: E:\Android_Projects\T&PUIET,KUK\app\build\outputs\apk\app-debug.apk
close android studio > rename folder containing the special character(here T&PUIET,KUK ) > restart android studio.
Hope it will help!
Related
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.
All packages are not available for download!
The following packages are not available:
- Package id sources;android-24
Am trying getting data from database by using of web services, when am running the application getting an above shown error.
How can I resolve this issue in the android studio?
Open SDK Manager -> SDK Platform
Check on Show Package Details and Sources for Android ... then download
The popup error is not related to the exception you got on your application. Api 24 source code is not fully available. Hence you got the error. Change complieSdkVersion and targetSdkVersion to 23 and sync the gradle.
I just closed my IDE then restarted my computer. When I opened the IDE the error was no more.
Make sure you have good internet connection, as the error might be caused by a lack of internet connection preventing the IDE from reaching the site.
Check if the SDK version is installed on Android studio for that particular Android device. e.g. If Android Device has version 4.3 then check if SDK for this version 4.3 is installed, you can check it through Android Studio SDK manager. If not installed then install it complete.
Restart Android studio, reconnect the device, That's it
A thing I ran into, check to see if you have more than one android sdk on your box. I'm not sure if it was confusing Android studio or not, but I had one previously installed under Program Files. I ended up going into the AppData\Local\Android version used by Android studio and adding stuff I needed manually running the SDK manager as administrator.
This means that you can't reach the download site, and it has many reasons one of them is that you are in a country in wich the American laws won't allow to use such technology so you have to use a proxy program and to configure the sitting in your Android studio to use the proxy gate and port.
I have tried literally everything to try and rectify this error when trying to deploy an app to an actual android device for debugging but have been unable to solve the matter. Everytime I try to launch I get a failed [INSTALL_FAILED_DEXOPT] error and when checking the logcat it is always because there is no classes.dex in my debug apk.
If I run gradlew.bat clean assembleDebug, there is no difference in the apk size so I'm assuming there is a build error in android studio. I am using android studio beta 0.86 and have tried it on 0.89 with the same result. I have tried build tools for 19.1 to 21 with no result. I have also tried different devices and created a new project (that has never been installed on my devices) and android studio seems to think it needs to be uninstalled first when attempting to deploy.
I have tried switching my device to ART, uninstalling and reinstalling android studio, redownloading the sdk and restarting my computer. NOTHING and I mean NOTHING has worked. I think the problem started after I downloaded the lollipop apis but am not sure. I have tried uninstalling all apps with my package signature on my device but NOTHING works! Not even Project -> Clean Project -> Rebuild
This is extremely frustrating as I cannot debug my apps anymore :/ has anyone had any experience with this error or ways to rectify it?
So turns out that the issue was mismatching sdks between Android Studio and the Project. The project was using an old sdk and once I made them the same, I cleaned and rebuilt the project and everything was good to go.
UPDATE:
I ran into the problem again after I tried to update my SDK and its tools. Turns out that when you try to do this, the SDK locks the tools folder and then you get an error saying some file couldn't be overridden. When this happened to me, all the build tools were deleted so there were errors in the .dex file created when debuggin my app.
We are using android 2.2 (really old i know) and couldn't find a fix for this error. Eventually we found this bug https://android-review.googlesource.com/#/c/30900/. The only solution for us was to remove some libraries...
I kept having the same problem - manually building worked fine, but Android Studio would not build a proper APK.
The problem was that I started the project on Android Studio and Android Gradle plugin version 2.0-beta2. After updating the Gradle plugin to 2.0-beta6 through a simple build.gradle change, the builds stopped working.
Turns out that, although I installed a beta version of Android Studio, the update checker only checked the stable channel. After setting the updater to check the canary channel as well, I was able to upgrade Android Studio to version 2.0-beta6 and builds continued to work normally.
You can change the update preference in Android Studio settings under Appearance and Behavior -> System Settings -> Updates.
I encountered this error when storage of the device is full. Try to open some space.
Try run these commands
adb reconnect
adb reconnect device
I am newbie in Android app development.
I am using Android Studio and created sample/new project of 'myapplication' as stated on this site:
https://developer.android.com/sdk/installing/create-project.html
I have successfully run this program on my Android device running on version 4.2.
However, I remover package Android4.4W SDK from SDK manager. And deleted this project and recreated. Now, whenever I am trying to run this program. I am getting following error:
Installing com.example.ashv.myapplication DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.example.ashv.myapplication"
pkg: /data/local/tmp/com.example.ashv.myapplication
Failure [INSTALL_FAILED_OLDER_SDK]
Notes:
I have delete existing installed filed from device.
I have check that following set 'android:minSdkVersion="17"'.
I have set it to 15 but it doesn't help.
Is 'Android4.4W SDK' is mandatory to run application on device?
(I can not install this package, after this studio doesn't render Android view (activity.xml design tab) with 'TextView' and shows error (render exception). That's why I have removed this package).
Please suggest.
I got the solution and would like to share.
Whenever i was creating my project, a file gradle.build (containing all tags like android:minSdkVersion="17", android:targetSdkVersion="17" etc.) were not updating values according to my device version even i was selecting correct version of API while creating project in android studio.
I have renamed my project and it worked.
Anyway, thanks for looking into my problem.
When I create a new project In the Minimun SDK option I selected Google APIs(Google Inc)(API18) instead of API18:Android 4.3 (Jelly Bean).
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.