0

Although I found a lot of instruction how to implement Renderscript via Support Library on API's lower than 3.0, there are also a lot of problems still. I followed a lot of instructions e.g. on android-developers.blogspot.de step by step, however, it didn't work at all. The thing is, that it causes errors, when I'm changing the line in the generated file ScriptC_example (which by default uses android.renderscript.* -> not available in API's lower than 3.0) to android.support.v8.renderscript.*

So whatever I tried, it always ended up in a mess... Has anyone an idea how to fix this implementation? I really need help, otherwise I'm going to get insane...

Screenshots:

EDIT: project.properties:

# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

# Project target.
target=android-8
renderscript.target=8
sdk.buildtools=19.0.1
Alex Girke
  • 43
  • 1
  • 7
  • make sure you've cleaned the project since setting the configuration options in project.properties, as those Java files are auto-generated with the appropriate package name depending on those settings. – Tim Murray Jan 02 '14 at 19:36
  • Thank you, but I already tried that! It's really just the one line with the rendescript import, that doesn't changes automatically... – Alex Girke Jan 02 '14 at 19:39
  • can you post your project.properties? are you also using proguard? what you're seeing suggests the build system isn't switching to the support lib at all, which is a lot more than just the wrong import line. – Tim Murray Jan 02 '14 at 19:46
  • By the way, I also tried `renderscript.target=18` and I didn't use proguard yet. And how can I check, whether the system switches or not? @TimMurray – Alex Girke Jan 02 '14 at 20:26
  • Ah, I forgot to mention, that I also tried it with the code line `renderscript.support.mode=true`, which caused only a lot more trouble namely this line within the console: `Renderscript support mode requires compilation target API to be 18+.` – Alex Girke Jan 02 '14 at 20:42
  • your renderscript target must be 18, and renderscript.support.mode must be true. (the renderscript target has no impact on the overall target because the support lib brings RS 18 to API 8+) I think you also need to target android-18 or higher, which modifies ADT behavior but not how your app actually functions. – Tim Murray Jan 02 '14 at 21:54
  • Thats it, I just had to use these lines `target=android-19 renderscript.target=18 renderscript.support.mode=true sdk.buildtools=19.0.1` and target therefore API 19. In eclipse also the android library changed from _Android 2.2_ to _Android 4.2.2_ and it still works. Now post your answer please, so I can mark this question as solved! – Alex Girke Jan 03 '14 at 12:35

1 Answers1

1

your project.properties should contain

target=android-18
renderscript.target=18
renderscript.support.mode=true
Tim Murray
  • 2,205
  • 13
  • 13