Android- Stuck with Running Project [duplicate] - java

This question already has answers here:
Android Failed to install HelloWorld.apk on device (null) Error
(22 answers)
Closed 9 years ago.
I'm Developing an Android Application for the Tablet Devices . When I run My I mostly get an Error in the console which is given below
[2013-03-15 15:52:01 - Gprs] Failed to install Gprs.apk on device 'emulator-5554!
[2013-03-15 15:52:01 - Gprs] (null)
[2013-03-15 15:52:01 - Gprs] Launch canceled!

I think any one of the following alternatives will work:
Try to chang the ADB connection timeout. I think the default is 5000ms and we need to change this to 10000ms to get rid of the problem. If you are in Eclipse, you can do this by going through Window -> Preferences and then it is in DDMS under Android.
Restart the device.
Increase SD card volume and max VM app heap size. For this edit the virtual device and do the modifications. Any change of emulator parameters and its rebuilding also fine.
Build the application. Then Install the apk using command prompt.
adb install

You can try these steps:
Try changing the ADB connection timeout. If you are in Eclipse, you can do this by going through Window -> Preferences and then it is in DDMS under Android. Default is 5sec, try making it 10 seconds.
If this doesn't works restart your device
Or try,
adb kill-server
adb start-server
command from command-line.

Try to change the ADB connection timeout.
Default - 5000ms
Change it to 10000ms
If you are in Eclipse, you can do this by going through Window -> Preferences and then it is in DDMS under Android.

Related

Cannot be root on Android Emulator

I'm currently trying to develop an application for Android devices on an Android Emulator. I installed Android 4.3 on a VMWare Workstation, on a Windows 10 OS.
I want to test the app I'm developping on the Android emulator, so I have to create a bridge connection between my phyisical computer where I develop the aps, and the emulator, where I can test it. But when I try to create this bridge, I have to change settings and to be root of the emulator. When I try to do a 'su' command, I have the following error :
'su : uid 10000 not allowed to su'
I tried to follow this tutorial to give me the root acces of the emulator, but it didn't worked for me. The best answer is to execute this commands :
adb shell mount -o rw,remount -t yaffs2 /dev/block/mtdblock03 /system
adb push su /system/xbin/su
adb shell chmod 06755 /system
adb shell chmod 06755 /system/xbin/su
How to get root access on Android emulator?
More over, When I did the installation of the Android Emulator, I've done the installation specifying the read-write option.
It is not working for me, because when I try the first row, I obtain this message :
ADB error : 'device not found'
Such as it is described in this link :
How to fix: Error device not found with ADB.exe
But the answer exists for a phone, and not for an emulator. Do you know how to fix it ? How can I be root, and how can I found the 'device not found' ?
Here are the different parameters of the VM
su stands for super users which is available only on rooted device. it is more like using android application with administrator privilege.Try using BLuestacks rooted version.

Open file APK after download [duplicate]

This question already has answers here:
Android: install .apk programmatically [duplicate]
(4 answers)
Install Application programmatically on Android
(18 answers)
Closed 7 years ago.
http://pastebin.com/aKUyw6nX
I searched the internet but I have solved my problem or the code given was not compatible
My question is, how do i open apk file after download?
Install from PC:
Download the Andorid SDK
Connect your phone to the PC via USB, make sure the USB Debugging option is ON under Developer Option in your phone settings.
Once you are done try to use these commands. adb devices to check the connection to your device and then if everything is OK try adb install <filename>.apk Make sure you input the correct path to the file or simply copy the apk into adb directory.
adb usually resides into adt-bundle-$version/sdk/platform-tool
Install from device:
Go to the settings
Enable Unknown sources in the security section
Click on the apk file

Unable to open the avd which is created

i created a avd named droidX which later wen i am starting that avd it could not open it just hangs showing "Starting emulator for droidX"
you can use bluestack emulator http://www.bluestacks.com/
1) open bluestacks emulator.
2) go to your environment variable settings and click on path variable and add the path of your abd in the platform-tools folder (Optional if you have done it before.)
3)open cmd and type adb connect adb connect 127.0.0.1
4)now open eclipse and click on project -> run as-> Android Aplication and you should see blueStack emulator running.

Eclipse doesn't find my already running Android emulators

Configuration
Os: OSX
IDE: Eclipse Juno
I don't know why but when I try to run again my Android app, the "Android Device Chooser" frame opens but my emulators are not shown in "Choose a running Android device" section. What should I do ?
Goto the DDMS view and try resetting the ADB as shown---
Please check the required API levels of the application and than on the device.
Try to run following commands in terminal that will renew the adb server state :
adb kill-server
adb start-server
You can try to use adb over the wifi and than no cables will needed.

Failed to install apk on real device

Like many I get this error but none of the solutions I found here did the job. I don't get this error when installing on an emulator, but I get this error with every app I'm trying to install.
This morning my phone went into save mode. After that I can't install an app anymore. The phone is already out the save mode though.
I don't get any errors in my logcat. Don't know what to do anymore. Could someone help?
It is similar to this question, but the only answer he got, I already tried.
Problem solved tanks to LisuBB
You can try to uninstall app from your device by executing
adb uninstall _nameofapp__
Try also to restart Android server
adb kill-server
adb start-server
and then try to install again.
check your phone's memory and see if you have enough memory . and restart it and check again.
Does the adb install work?
If so, try to install on an external sdcard through the cmdline.

Categories

Resources