RenderScriptMigrationSample: target API level '29' is out of range ('11' - '24')
mariusboepple opened this issue · 4 comments
mariusboepple commented
I'm getting this error when trying to install the RenderScriptMigrationSample app target API level '29' is out of range ('11' - '24')
Maybe this bug from March 2017 is related to this (but that's 4 years now, so come on...) https://issuetracker.google.com/issues/37140083
Android Studio 4.1.3
Executing tasks: [:app:assembleDebug] in project /Users/.../renderscript-samples/RenderScriptMigrationSample
> Task :app:preBuild UP-TO-DATE
> Task :app:preDebugBuild UP-TO-DATE
> Task :app:compileDebugAidl NO-SOURCE
> Task :app:compileDebugRenderscript FAILED
error: target API level '29' is out of range ('11' - '24')
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugRenderscript'.
> com.android.ide.common.process.ProcessException: Error while executing process /Users/.../Library/Android/sdk/build-tools/30.0.3/llvm-rs-cc with arguments {-I /Users/.../Library/Android/sdk/build-tools/30.0.3/renderscript/include/ -I /Users/.../Library/Android/sdk/build-tools/30.0.3/renderscript/clang-include/ -p /Users/.../Documents/Apps/renderscript-samples/RenderScriptMigrationSample/app/build/generated/renderscript_source_output_dir/debug/out -target-api 29 /Users/.../Documents/Apps/renderscript-samples/RenderScriptMigrationSample/app/src/main/rs/colormatrix.rs /Users/.../Documents/Apps/renderscript-samples/RenderScriptMigrationSample/app/src/main/rs/blur.rs -O 3 -o /Users/.../Documents/Apps/renderscript-samples/RenderScriptMigrationSample/app/build/generated/res/rs/debug/raw}
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 442ms
1 actionable task: 1 executed
Kottsone commented
Thanks for reporting this issue. This is because "renderscriptTargetApi" gets overridden by "minSdkVersion" and the RenderScript compiler won't accept any target API greater than 28. We will fix this issue in the next SDK release. For now, a work around is to use minSdkVersion 28.
1280149014 commented
any update for this issue ? I meet this error too
Kottsone commented
@1280149014 The fix is currently available with SDK Build Tools 31.0.0.