简体   繁体   中英

How to run project which depends on library in Android

I have two project in Eclipse for Android. 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. It's driving me nuts, 80% editing of source code is in library. In earlier version of Android SDK, there was a link to library source, but in release 16 they remove that link. 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

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

Look at this Setting up a Library Project guide. Setting the project as library works fine with SDK Rev.16

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM