ddms

Eclipse, adb, and ddms not detecting Android Emulator

左心房为你撑大大i 提交于 2019-12-29 03:36:26
问题 I wanted to try my hand at programming android devices, so I followed the directions from the android website, installed the sdk, the java sdk, and eclipse. My computer is Windows 7 64-Bit, but I have the 32-bit Java SDK and Eclipse installed since hearing that there are issues with the 64-bit versions. I am running the most recent version of the Android sdk, 4.0 R15. I believe followed all of the instructions for installation, but when I load up a sample (Lunar Lander in this case), it loads

Unable to open DDMS in Android Studio. Mysterious Eclipse error pops up

假如想象 提交于 2019-12-28 04:31:19
问题 So here I go again with yet another Android Studio tools error. I don't think this one has been reported before, I can't find any posts on it. I am trying to open the Device Monitor (DDMS) in Android Studio by clicking on the following button: Every time I get the same error. What's really puzzling is that its an Eclipse error, as shown in the image: So it tells me to open a log file in the Android Studio SDK folder. The log file contains lots of text, but the main error is reported as:

Android: OutofMemoryError: bitmap size exceeds VM budget with no reason I can see

浪子不回头ぞ 提交于 2019-12-28 02:03:28
问题 I am having an OutOfMemory exception with a gallery over 600x800 pixels JPEG's. The environment I've been using Gallery with JPG images around 600x800 pixels. Since my content may be a bit more complex than just images, I have set each view to be a RelativeLayout that wraps ImageView with the JPG. In order to "speed up" the user experience I have a simple cache of 4 slots that prefetches (in a looper) about 1 image left and 1 image right to the displayed image and keeps them in a 4 slot

DDMS查看Threads情况

夙愿已清 提交于 2019-12-26 09:29:07
from: DDMS查看Threads情况 有时候程序运行出现死锁或者信号量卡死是很纠结的问题,单看代码很难分析定位问题,这时候可以借助DDMS来查看threads的运行情况,一目了然。 手机连接上USB,确保adb连通,然后启动Eclipse里的DDMS,这时候应该手机就正常连接上了 就如上图中显示的,只要连接上了就可以查看某个进程里的所有线程的活动了; 下面具体解释下Threads标签页里给出的每个字段的意思: ID : 虚拟机分配的唯一的线程ID,在Dalvik里,它们是从3开始的奇数。 Tid :linux的线程ID号 Stauts :线程状态,比较多,有下面的一些 running: 正在执行程序代码 sleeping:执行了Thread.sleep() monitor:等待接受一个监听锁。 wait::Object.wait(),等待被其他线程唤醒 native:正在执行native代码, vmwait:等待虚拟机,(这个不是很懂,高手指教,这个状态在什么情况下发生) zombie:线程在垂死的进程 init:线程在初始化(我们不可能看到) starting:线程正在启动(我们不可能看到) utime :执行用户代码的累计时间 stime :执行系统代码的累计时间 name :线程的名字 另外,右侧每个Thread选中之后可以在下面看到Refresh按钮,这个点了之后

DDMS Debugging: Android app (I'm developing) causes device (ONLY Nexus 5) to hang and must restart when using ZXING and Dialog

痴心易碎 提交于 2019-12-25 05:17:10
问题 I'm developing an android app. I'm using ZXING fragment open source barcode scanning. I have an option to manually input the barcode. So when the user press the manual input button I open a dialog with edit text. Before the dialog appears I pause the camera and scanning. This causes the device to hang, the top bar multiples it self adding it self more and more times until it fills the display. The only way to get out of this situation is to restart the device. This bug only reproduce in Nexus

Fetch data from existing sqlite database

旧街凉风 提交于 2019-12-25 00:35:31
问题 I am having an existing sqlite database. I am developing an android app and I want to connect it with this existing sqlite DataBase. Problem 1: I have already included the sqlite database in my project via "DDMS push database function" as per my instructor's advise. Now I want to fetch the data from database, do I need to use SQLiteOpenHelper. If yes, how to use it and what will be coded in onCreate(SQLiteDatabase db) function and onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion)

Send spoof locations with DDMS emulator control to a tablet android device

久未见 提交于 2019-12-24 17:24:30
问题 I want to test a GPS application I am developing in my android tablet, so I need to send to it spoof locations from a KML file loading it using DDMS. I want to use a physical device, not the emulator. The problem is that the Emulator Control section in DDMS is disabled (grayed out) when I select my external device (the app process running) in the devices view. Insted if I select the emulator then the emulator control appears enabled but not with the physical device. My applicaton has <uses

Eclipse DDMS not showing anything but adb, ddms are working!

坚强是说给别人听的谎言 提交于 2019-12-23 18:34:06
问题 The eclipse DDMS perspective is not detecting any attached devices or even the emulator. I have tried using adb and ddms from the command line and both are working! What gives? 回答1: If your device is not set in the Development section to Stay awake (checked) , this might get to be a regular problem. You should disable and then enable again the debug mode on your device. 回答2: Somehow the Android SDK setting from the eclipse preferences was reset and hence Eclipse was not able to detect the

Why the Application and it's resources are being kept in the memory after exiting in Android?

时光总嘲笑我的痴心妄想 提交于 2019-12-23 17:48:02
问题 I have a simple Hello World application public class TestLeaksOnFinish extends Activity { static int ctr = 0; protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); TextView t = new TextView(this); t.setText("Hello World! "+ctr++); setContentView(t); } } When I run this multiple times, each time followed by pressing BACK, I see that ctr increases each time, indicating that the Activity is not killed completely after BACK. This is also confirmed by dumping the

Why DDMS will disable ADB integration in android studio

戏子无情 提交于 2019-12-22 12:23:32
问题 I was confused about a new problem since yesterday. I am now using DDMS to debug my app on my android device. It used to appear that I instant run the app from android studio it notices me i need to enable ADB integration, but not often. Since last night, once I enable ADB integration, ddms will not be able to capture log from device it goes "Adb connection Error:An existing connection was forcibly closed by the remote host" in DDMS. and if I restart the DDMS, it will turn ADB integration