简体   繁体   English

如何在Android中运行依赖库的项目

[英]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.

相关问题 Android Studio - 使用依赖于另一个Android库的Android库构建Android项目 - Android Studio - Build an Android project with Android library which depends on another Android Library 如何使用Android WebView运行依赖于另一个库/模块的JavaScript - How to use Android webview to run javascript that depends on another library/module 如何运行一个android库项目? - How to run an android library project? 构建取决于Android Project Gradle的Java库 - Building Java Library that Depends on Android Project Gradle Android 测试依赖于库项目上的测试类 - Android tests depends on test classes on a library project 将Android库发布到依赖本地Android库项目的Maven - Publish Android library to Maven that depends on a local Android library project 可能的Android项目取决于其他(非库)Android项目? - Possible Android project depends of other (non library) Android project? 当它依赖于具有 Android 库项目依赖项的非库项目时,如何使用 ANT 构建我的项目? - How do I build my project with ANT when it depends on a non-library project with an Android library project dependency? 如何运行android LVL库的示例项目 - how to run sample project of android LVL library 当本机共享库依赖静态库时,如何将基于Android.mk文件的Android NDK项目迁移到Gradle? - How to migrate an Android NDK project based on Android.mk files to Gradle when a native shared library depends on a static library?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM