简体   繁体   中英

Android SDK or JDK

I have an Eclipse project in which I have 2 entrypoints: a GWT web application and a mGWT+phonegap(+Android) mobile app. There are under the same project, as they are based on the same Java code. Debugging let me suspect that within the web application, the Android implementation are used, instead of the JDK implementation. Why, because during debugging, I have to choose the correct java file (for instance Float.java). How can I ensure that the Web application does not use the Android libraries?

You don't need your Android-SDK in the GWT project. Don't include it in your Web-Project.

Split the two project and link the source Files with linked folders.

  1. GWT Application with two entry points

  2. Android Native Application

In your Android Project you can link the folder from your GWT Application: http://deviltechie.wordpress.com/2010/12/06/linking-an-external-folder-to-eclipse-flex-builder-project/

I do not believe that can be done.

It would be a best practice to split your project into

main project
 subproject 1 ( common code )
 subproject 2 ( entrypoint gwt webapp)
 subproject 3 ( entrypoint android)

This will ensure ensure top level modularity, testability and any adverse debugging/deployment scenarios like yours. There is a good chance poor lib management causing issue in production.

You can opt for maven ( gwt is well supported ) or ivy or any other tool to simplify your build.

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