adt

C -- 栈

本秂侑毒 提交于 2019-12-24 04:21:53
什么是栈( stack )? 栈,也是一种链表系列的另一种数据结构。和队列恰恰相反。 队列 (Queue)First in first out,即先进先出,通俗点说就是只能从尾添加,从头开始删。 栈 (Stack)Last in first out, 即 后入先出 ,通俗点说就是从尾部添加(入栈),只能从尾部开始删除(出栈)。 其实之前学到过一个函数,好像是叫 atexit() ,参数是一系列函数指针,这个函数的执行就有点像栈的方式,后入列的先执行。(这个说法可能不是很准确) 设计实现一个 Stack ADT 此处再补充一下ADT的概念: ADT(Abstrac Data Type),抽象数据类型,指类型的属性和相关操作的抽象描述,这种描述不依赖于特定的实现和编程语言; 以下描述重要步骤,完整Stack.h以及实现Stack.c见文末。 第一步: 基本定义 typedef struct _item { /* unknown */ } Item ; /* 定义基本单元节点 */ typedef struct _node { Item item ; struct _node * next ; } Node ; /* 定义栈类型 */ typedef struct _stack { Node * head ; Node * tail ; int size ; } Stack ;

Unable to open both main.xml files from layout & layout-land at the same time?

☆樱花仙子☆ 提交于 2019-12-24 02:00:14
问题 While developing for Android, I am unable to open more than one main.xml file in an Eclipse editor at a time. Each time I open one, it simply replaces the editor (tab) of the first main.xml with the new one, instead of opening a new tab - even if the contents of the existing tab were unsaved! Even stranger, I can open multiple main.xml files from different projects with no problems. This only happens when they're within the same project. Any idea how to fix or work around this? It's a real

“Failed to parse the output of 'adb version'”, “The connection to adb is down, and a severe error has occurred”

。_饼干妹妹 提交于 2019-12-24 00:42:09
问题 At the moment I can't even get the Hello World app from the Android tutorial to work. I'm trying to run it on my Galaxy S4. My phone has USB debugging enabled and has USB verification of apps disabled. I have Android 4.2.2 SDK (API17) downloaded and installed and am currently using Eclipse with the ADT plugin on Windows. First it gives the "Failed to parse the output of 'adb version'" error message and then prints the following in the console: [2013-06-12 23:02:50 - TestApp] -----------------

Android device does not show up in Android Device Chooser, but is listed in adb

你说的曾经没有我的故事 提交于 2019-12-24 00:41:52
问题 I'm using Eclipse+ADT on Mac OS. I have a Nexus 5 connected via USB, but it does not show up in the Android Device Chooser when I run my app from Eclipse. Actually, it did show up once, and I could deploy my app to the phone, but then it just disappeared from the Android Device Chooser. The really weird thing is that the device is listed when I run adb devices on the terminal. I even get the debug messages from the phone in Eclipse's LogCat, so it clearly is connected and recognized – but it

Adding Non-Android Project to an Android Project

三世轮回 提交于 2019-12-24 00:05:58
问题 I have three projects in Eclipse: Base, Server, and AndroidClient. The Base and Server are Java 1.7 projects, while the AndroidClient is obviously an android project. The base project has classes and files that are shared between the server and android client. I understand that the Android doesn't use all of the normal Java classes and there's some deal about the Dalvik being different enough from the JVM that you have to compile them separately. Assuming I'm careful not to use any java

Eclipse ADT: Working but “Terminate” button greyed out…?

允我心安 提交于 2019-12-23 19:39:07
问题 I've got Eclipse with ADT installed and running. Debugging is working over both USB and TCP/IP (WiFi) including live breakpoints. I'm a seasoned firmware/software developer, just new to Android/Java, and I'm pretty impressed so far with the development environment. Basically, everything is fine - except that I cannot formally terminate a debug session. The Terminate button is visible in the Run menu but is greyed out. The Suspend and Disconnect icons are functional, just not Terminate. I've

No preview of custom views on UI designer in Eclipse

梦想的初衷 提交于 2019-12-23 19:22:49
问题 Background I've been creating many types of custom views, and normally i get their previews shown just fine on the UI designer of ADT. lately, after updating to the newest version of the ADT ( 22.0.5.v201307292155--757759 ), i can't see any type of custom view, not even the simplest one . The problem now, i know for sure that custom views can be previewed fine , since if i create a new workspace and create them, i can see them just fine. the problem is that on the current workspace, which has

Failed to fetch URL http://dl-ssl.google.com/android/repository/addons_list.xml 404 not found

怎甘沉沦 提交于 2019-12-23 19:13:48
问题 I am trying to update lastest android SDK manager on lastest JDK 1.8. Updating gives me info about failed xml fetch, also I can't open it in the browser: Any attempts to install any updates fail this way: I am on windows7 64bit, no proxy, no firewall, running manager as admin. Tried: (un)checking https checkbox removing java64, reinstalled jdk setting proxy passing -Djava.net.preferIPv4Stack=true arg to java.exe setting ANDROID_SDK_HOME but nothing helps. 回答1: Well, I've found a solution. get

Android emulator not showing the app- it only shows the skin

旧城冷巷雨未停 提交于 2019-12-23 07:01:17
问题 I started to develop android apps a few days ago, but I'm stuck with this problem. I'm using Eclipse with ADT and have created the simple Hello World or any of the other sample applications, and when I run the project, Eclipse launches the Android emulator but it shows only the skin, with the screen saying "ANDROID" and nothing else, it's unresponsive to anything I do in the code. It happens targeting both 2.2 and 1.5 versions, why is this happening and how can I fix this? 回答1: The emulator

Android Config in Eclipse - SDK Preferences wants …\Platforms, but SDK doesn't come with one

£可爱£侵袭症+ 提交于 2019-12-23 05:13:26
问题 I'm installing and configuring Eclipse Galileo 3.52 on a PC following the instructions on Eclipse ADT All the steps in "Downloading the ADT Plugin" go fine with no errors. But when I get to the next step "Configuring the ADT Plugin" it fails when I set my SDK location, saying that it can't find android-sdk-windows\platforms. But no kidding - I'm using the android-sdk_r06-windows SDK and the Readme file says, " The Android SDK archive now only contains the tools. It no longer comes populated