0

New to Android. I'm trying to build the HelloCompute sample code for API 17 with ADT v22.0.1 under Windows 7. I do File:New Project:Android Sample Project, and select HelloCompute. In the Package Explorer I see HelloCompute.java and mono.rs in src under com.example.android.rs.hellocompute. However, I don't see any reflected layer code under gen, and I get the error "ScriptC_mono cannot be resolved to a type". I have tried re-installing eclipse / adt, and re-installing the sample code.

Is there some manual step I need to perform to generate the reflected layer?

Thanks.

  • It looks like it's a path problem. Eclipse is looking for llvm-rs-cc.exe under platform-tools, but it is actually under build-tools\android-4.2.2. I tried copying it over to platform-tools, but it now complains about other files (e.g., rs-core.rsh). I could just copy things over piecemeal until it works, but I'd like to do it correctly. Should I fix this with Windows PATH, or somewhere in the eclipse / ADT preferences? – Peter W Fraser Jun 08 '13 at 03:04

3 Answers3

0

I ran into a similar problem.

I got around it by running llvm-rs-cc on mono.rs and generating the ScriptC_mono.java file. Eclipse then picks up this source and compiles everything successfully.

I do not know yet whether is there a way of telling eclipse to do it automatically.

0

The latest ADT does have a problem in generating RenderScript code as part of the build process, so you need to do this step manually right now (or look at other threads suggesting workarounds). Hopefully the upcoming ADT will actually fix this issue so that everything gets created automatically.

Stephen Hines
  • 2,612
  • 1
  • 13
  • 12
0

Had the same problem. Win 7 64bit. Eclipse 4.2.2.

Upgraded to:

SDK Tools: 22.0.5. Platform-tools: 18.0.1. Build-tols: 18.0.1.

Problem solved.

Renderscript compilation was broken in ADT 22.0.1. Fixed for non-Windows platforms on 22.0.4. Fixed for Windows platform on 22.0.5.

Vaiden
  • 15,728
  • 7
  • 61
  • 91