[英]How to run project which depends on library in Android
I have two project in Eclipse for Android. 我在Android的Eclipse中有两个项目。 One is library and second is normal "executable", which depends on library.
一个是库,第二个是正常的“可执行文件”,具体取决于库。 But the problem is, when I'm editing source files from the library, I make my changes and I want to try it, Eclipse say that "Android library project could not be run", so I have to manually switch to some source file from "executable" project and then run it.
但是问题是,当我从库中编辑源文件时,我做了更改并想尝试一下,Eclipse说“ Android库项目无法运行”,因此我必须手动切换到某些源文件从“可执行”项目中运行,然后运行它。 It's driving me nuts, 80% editing of source code is in library.
我真疯了,80%的源代码编辑在库中。 In earlier version of Android SDK, there was a link to library source, but in release 16 they remove that link.
在早期版本的Android SDK中,有一个到库源的链接,但是在版本16中,他们删除了该链接。 I can make that link manually, but then the changes I make, doesn't seems to take effect, unless I change one the "executable" source fles.
我可以手动创建该链接,但是除非更改了“可执行”源文件,否则我所做的更改似乎不会生效。 Please help!
请帮忙!
the following works for me: in following Eclipse preferences 以下对我有用:在以下Eclipse首选项中
Run/Debug->Launching->Launch Options 运行/调试->启动->启动选项
choose either 选择其中一个
Always launch the previously launched application 始终启动以前启动的应用程序
or 要么
Launch the selected resource or active editor. 启动选定的资源或活动的编辑器。 If not launchable: Launch the previous launched application.
如果无法启动:启动先前启动的应用程序。
-- P -P
Look at this Setting up a Library Project guide. 请参阅此“ 设置图书馆项目”指南。 Setting the project as library works fine with SDK Rev.16
将项目设置为库可与SDK Rev.16正常运行
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.