English 中文(简体)
是否需要单独的剪辑项目,以便与PC代理人一起开发。
原标题:Do i need separate eclipse projects to develop for Android with PC agent

I am writing an Android app that will communicate with the PC. I tried to create 2 packages in a single eclipse project, but this doesn t seem to work. When i try to debug the PC java application, it crashes with "Cannot connect to VM". I searched for this, and found suggestions to turn of the Windows Firewall and reboot. This did not work. The crash report states:

# Internal Error (classFileParser.cpp:3494), pid=4408, tid=4776
# Error: ShouldNotReachHere()

Maybe there is a best practice that I am missing? Should these two similar code units (they share some common classes) be in separate projects, or am I taking a good approach, and just running into some configuration problem?

最佳回答

如果你真的希望把两个项目都列入一个单列项目,那么你必须做以下工作:

  1. create a run confguration for your PC project (Run -> Run configurations -> add)
  2. set the JRE to any JavaSE (1.7 for example) (tab JRE)
  3. remove Androidx.x library vom Bootstrap Entries (tab Classpath)

现在,你应该能够管理你的c项目。

------

关于您关于最佳做法的问题。 我认为,除非您的PC项目确实很小(如只有一个类别),否则很可能不得不将项目分开。

问题回答

I feel like having two separate projects will be the way to go for you. Organizationally, I believe this will work better. This may also help you to avoid issues like these in the future.





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签