문제

I am developing a study project using the mosembro (mobile semantic browser) project inside my Android project. I am using Eclipse and I created my project, downloaded / imported mosembro and included in my project's build path.

So now my code needs to refer to a resource in the mosembro's project. I want to do something like this:

String commonJS = getScript(R.raw.common);

In this snippet, I want to load a javascript file from mosembro's project: res -> raw -> common.js so I need the java syntax to get "R" (precompiled resource-class) of Mosembro from my HelloGoogle project.

What is the syntax to replace the R-class of this with the included project's R-class.

Is that clear?

도움이 되었습니까?

해결책

I found the answer and it is very simple. You can add projects to your project through the Java Build Path.

  1. Right click on the project you are working on
  2. Select Build Path -> Configure Build Path ...
  3. Then pick the Projects tab
  4. Finally, press the Add... button and select the project that you want to include.

This keeps everything in code-sync if you make changes rather than cut-n'-paste.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top