I am a stranger in android-programming.
My phone reboot once in every three times when I run app from eclipse.
(I always launch application on active devices, not on AVD.)
I googled lots of sites, but there is no solution.
I tried:
Switch USB port
Project -> Clean (in Eclipse)
Delete application and re-install
Clean temporary files and registries
Re-install Eclipse and Android SDK
However, they are not the solution to this problem.
Here is my info:
Eclipse ver: ADT (Build v21.1.0-569685)
Phone OS: ICS (4.0.3)
Phone model: LG Prada 3.0
Rooted: Yes
ROM: not use custom ROM
Does anybody have any idea?
Related
I have been testing my Android app in my Samsung Galaxy S8 for the past few weeks from Android Studio's ADB without any issues.
After a while a switched to test the app in Android Studio's built-in emulators.
Then I swiched back to test it in my Samsung and it won't install the app.
I would plug the phone to the laptop, Android studio's ADB would recognize the device, I hit run, and after the Gradle build, as soon as it goes into 'install', the process stops, and prints the following:
10/16 14:34:46: Launching 'app' on samsung SM-G950F.
Installation did not succeed.
The application could not be installed.
List of apks:
[0] '/Users/david.rajchenberg/Desktop/JByte Studios/Practice/SpeechToText-master/app/build/outputs/apk/debug/app-debug.apk'
Installation failed due to: 'device 'ce031713eb784b1f03' not found'
Retry
I have tried the following:
Uninstall and reinstall Android studio
Turn off and back on my device
Switch USB cables (I only have so many)
Switch USB ports
Clean project
Build project
Unplug and and plug back in the device and wait until Android Studio recognizes it again
I checked the phone's connectivity to the laptop and its okay. I am able to move files in and out of the device, to the computer and back.
Developer options is activated with USB debugging
To summarize
Android Studio recognizes the device as soon as I plug it into the laptop, but as soon as I hit run and gradle is done building, as soon as the process goes into install, the connection between Android Studio and the device is lost, while the device, is still connected to the computer (and able to move files in an out with ease).
I run Android Studio 4.1 on a MacBook Pro with macOS Catalina 10.15.6
Any assistance would be highly appreciated.
Thank you,
Turns out I needed to kill the adb from Activity Monitor (Mac) and restart Android Studio. Apparently that did the trick
Today I downloaded Android Studio for my Debian Testing system. I wanted to run a HelloWorld application but weren't able to run it. With adb I can install it without having any problems.
However, if I try to do it with Android Studio, it gets stuck on 'Installing APKs'. The same happens when I try to start it in an emulator (gets stuck on 'Waiting for target device to come online').
My device is a Samsung Galaxy S3 with LineageOS (Android 7.1.2) and root permissions. Android Studio recognizes my phone properly.
What I've already done:
installed openjdk
set android_home
installed all the SDK-platforms since Android 4.3 and Android Emulator from SDK tools
enabled USB-debugging
tried with MTP and PTP
tried another emulated phone
installed lib32stdc++6
restarted my computer
and probably much more
I tried to do it the whole evening and couldn't find a solution. Is there something Debian-specific because I can only find instructions for Ubuntu? I have never experienced anything close to this on other systems.
Thank you in advance.
EDIT: I am now able to use my phone to run the android application by using USB 2.0 instead of USB 3.0! Is that a normal behavior since it works with native adb? I mean, if I buy a new PC after some years which has got only USB 3.0 ports, will I not be able to use phone debugging with Android Studio or is this just an issue? It is still known since 2014 (https://stackoverflow.com/a/9548311/8292104).
However, I still cannot get the app running on an AVD. I changed graphics to software, now it shows the phone but the screen remains black and the phone won't start. What can I do to fix it?
Try to completely delete and install Android Studio again, I think that it will solve the problem
Another possible solution that worked for me is to, in the application, go to
app - build - intermediates - split-apk - debug - slices
and then delete all of the contents within this folder. Then again, this only worked for me, so I would duplicate the document in case of corruption.
I'm trying to develop an Android app using the Eclipse IDE and I want to debug using my physical Moto X (2nd gen, Android version 4.4.4). I thought it was as easy as turning on USB debugging on the phone, plugging it into my macbook (OS X Yosemite 10.10.1), running my Android application from eclipse, and selecting my device.
However when the device chooser dialogue comes up, it doesn't show my moto x in there. It shows all the Android Virtual Devices I have set up, but nothing under running Android device. What's particularly mind-blowing about this to me is that I can clearly see my device in the eclipse device view as online. I can also see it by going into the sdk folder and running adb devices. The only time to doesn't show up is when I try to run the application and select what to run it on.
Has anyone ever encountered this problem before? Is there something here I'm missing? I have the latest Android SDK all up to date, as well as my Eclipse (I'm running Juno if that matters). My Min SDK version is 11, and the Target is 21, so my device should be in that range. I have also tried restarting the device, eclipse, and even my macbook with no luck.
If you are on Yosemite, try to drag corner of one of the column headers in the device chooser box and it will show the device. This is a hilariously stupid bug on eclipse for Mac. Check this answer.
There might be something wrong with eclipse. Sometimes the only solution to fix eclipse is to redownload a fresh copy of ADT from website.
You say that you can see your device when you run adb devices.
In this case use eclipse to build your project then use adb to install the apk on the phone:
adb install /path/to/projectRoot/bin/myBuild.apk
Better yet I would take this as a sign to forget Eclipse and move to Android Studio. Version 1.0 was released today (no more beta).
I am having trouble running an app I am developing in Android Studio on my Nexus 7. I have successfully gotten this to work before using the same tablet and computer (running Windows 8), but since having my laptop repaired and everything wiped I'm convinced something with my dev environment is messed up.
When I go to run the project, there are no available devices, so it is not recognizing my Nexus 7 anymore.
Things I have tried
making sure my computer recognizes the device and that I have the Nexus 7 driver installed from ASUS
going to the SDK manager and ensuring I have the Google USB driver installed
closing Android Studio and re opening it, restarting my computer, restarting my Nexus 7
killing adb.exe from the task manager
ensuring I have USB debugging enabled and toggling that on and off
switching from MTP to PTP and back again (currently connected as MTP, not sure if that is correct)
Any help would be greatly appreciated. This is very frustrating and I would like to just get back to developing again.
Update- I just noticed that when I go to developer options, "Wait for debugger" (near where you toggle USB Debugging) is grayed out. I think this has something to do with it but I'm not sure how to enable it.
I got it!
This was at least the issue in my case, I hope maybe this will help someone someday, apparently I had not installed the adb driver properly:
Search for Device Manager from the search bar on the start screen
Open Device manager, click on your Android device
Select"Update Driver Software"
BOOM. Now Android Studio recognizes the device.
I know this may not be the solution for everyone, but its worth a shot if you are having trouble testing apps on your device.
Between upgrading my second-gen Nexus 7 to Android 5.0.x and Android Studio leaving beta I lost the ability to debug on my tablet.
To get this working again I used a combination of the above advice.
I grabbed a copy of the USB Driver from Asus, but updating the Device in Device Manager and pointing to the unzipped files wasn't enough.
The next step was to point Device Manager to the Android Studio sdk directory (on a 64-bit Windows 8 install that was C:\Program Files (x86)\Android\sdk - beta versions of Android Studio - or %localappdata%\Android\sdk - switched to in 1.x) and then things worked just fine again.
Another possible reason that you may not be able to connect is:
Don't forget to enable debugging mode in Android setting.
I have had the same problem, although just getting started with my Nexus 5 and windows 7. I installed google usb driver package using SDK manager first, computer recognized phone but studio could not find it. Went in to manually update driver for phone but update driver couldnt find it, downloaded driver separately and pointed it to directory path, driver installed then studio found it and ran fine.
I've installed eclipse (JUNO version), SDK, ADT (20.0.3) and configured them through the Developer.android.com. After that I made a virtual device on eclipse (Android 4.1 API level 16) as well, but when I run the "Hello World" application in eclipse, the emulator is running with out error but the app is not running on the emulator.
There is also the problem with real device. I use Windows 7/64 bit and HTC incredible S phone. When I connect the device to my pc, windows detect it, but eclipse does not detect it. (The USB Debugging is enable on device and USB driver is updated on windows).
I tried different solutions like reinstalling eclpise, SDK and ADT, removing ADV and creating the new one,... but the problem did not solve.
Did u located your android sdk? If not,locate the sdk as follows:
open Eclipse->Windows->preferences->Android->Select your android sdk folder.
then please try to run you program. Tell me the status after that.