gpt4 book ai didi

android - 为 pre honeycomb 构建渲染脚本

转载 作者:行者123 更新时间:2023-11-29 18:05:33 27 4
gpt4 key购买 nike

我有一个目标版本为 16 的项目,我正在使用 SherlockActionBar 和支持库来支持低至 API 级别 8。我正在尝试集成 CarouselView到我的项目。我计划对支持的版本使用 CarouselView,对其他版本使用 pageViewer。我正在使用 Jetbrains IDEA 进行开发。通常我可以使用 IDEA 毫无问题地构建和部署我的应用程序。但是我无法使用 android-tools 构建应用程序。结果错误在底部。

在调查错误时,我意识到 renderscript triest 使用 api-level 8 进行编译。我查看了 %sdk.dir%\tools\ant\build.xml,发现 renderscript 目标使用 project.minSdkVersion 作为 targetApi。这是错误还是什么?

<renderscript executable="${renderscript}"
includePathRefId="android.renderscript.include.path"
genFolder="${gen.absolute.dir}"
resFolder="${out.res.absolute.dir}/raw"
targetApi="${project.minSdkVersion}"
optLevel="${renderscript.opt.level}"
buildType="${build.is.packaging.debug}"
previousBuildType="${build.last.is.packaging.debug}">
<source path="${source.absolute.dir}"/
</renderscript>

-code-gen:

[mergemanifest] Found Deleted Target File [mergemanifest] Merging AndroidManifest files into one. [mergemanifest] Manifest merger disabled. Using project manifest only. [echo] Handling aidl files... [aidl] No AIDL files to compile. [echo] ---------- [echo] Handling RenderScript files... [renderscript] Found 1 RenderScript files. [renderscript] Compiling 1 RenderScript files with -target-api 8 [renderscript] Optimization Level: 0 [llvm-rs-cc.exe] D:\Projects\TEB\teb\src\com\pozitron\teb\customwidgets\carousel\carousel.rs:236:14: error: structs containing vectors of dimension 3 cannot be exported at this API level: 'carouselPlane' [llvm-rs-cc.exe] D:\Projects\TEB\teb\src\com\pozitron\teb\customwidgets\carousel\carousel.rs:242:17: error: structs containing vectors of dimension 3 cannot be exported at this API level: 'carouselCylinder' [llvm-rs-cc.exe] D:\Projects\TEB\teb\src\com\pozitron\teb\customwidgets\carousel\carousel.rs:254:21: error: structs containing vectors of dimension 3 cannot be exported at this API level: 'cardVertices' [llvm-rs-cc.exe] D:\Projects\TEB\teb\src\com\pozitron\teb\customwidgets\carousel\carousel.rs:262:26: error: structs containing vectors of dimension 3 cannot be exported at this API level: 'camera' [llvm-rs-cc.exe] D:\Projects\TEB\teb\src\com\pozitron\teb\customwidgets\carousel\carousel.rs:1503:20: error: structs containing vectors of dimension 3 cannot be exported at this API level: 'p' [llvm-rs-cc.exe] D:\Projects\TEB\teb\src\com\pozitron\teb\customwidgets\carousel\carousel.rs:1045:9: error: structs containing vectors of dimension 3 cannot be exported at this API level: 'ray' [llvm-rs-cc.exe] D:\Projects\TEB\teb\src\com\pozitron\teb\customwidgets\carousel\carousel.rs:1092:9: error: structs containing vectors of dimension 3 cannot be exported at this API level: 'ray' [llvm-rs-cc.exe] D:\Proj [llvm-rs-cc.exe] ects\TEB\teb\src\com\pozitron\teb\customwidgets\carousel\carousel.rs:1503:20: error: structs containing vectors of dimension 3 c [llvm-rs-cc.exe] annot be exported at this API level: 'p' [llvm-rs-cc.exe] D:\Projects\TEB\teb\src\com\pozitron\teb\customwidgets\carousel\carousel.rs:1781:17: error: structs containing vectors of dimension 3 cannot be exported at this API level: 'ray'

BUILD FAILED D:\Android\android-sdk\tools\ant\build.xml:645: The following error occurred while executing this line: D:\Android\android-sdk\tools\ant\build.xml:665: null returned: 1

编辑:正如 Selvin 所建议的,我从旧版本复制了 renderscript 文件夹和 llvm-rs-cc.exe。现在我收到以下错误:

[mergemanifest] Found Deleted Target File
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
[echo] Handling aidl files...
[aidl] No AIDL files to compile.
[echo] ----------
[echo] Handling RenderScript files...
[renderscript] Found 1 RenderScript files.
[renderscript] Compiling 1 RenderScript files with -target-api 8
[renderscript] Optimization Level: 0
[llvm-rs-cc.exe] Generating ScriptC_carousel.java ...
[llvm-rs-cc.exe] Generating ScriptField_ProgramStore_s.java ...
[llvm-rs-cc.exe] Generating ScriptField_Card.java ...
[llvm-rs-cc.exe] Generating ScriptField_FragmentShaderConstants_s.java ...
[echo] ----------
[echo] Handling Resources...
[aapt] Found Deleted Target File
[aapt] Generating resource IDs...

BUILD FAILED
D:\Android\android-sdk\tools\ant\build.xml:645: The following error occurred while executing this line:
D:\Android\android-sdk\tools\ant\build.xml:683: java.lang.IllegalAccessError: tried to access class com.google.common.base.Platform from class com.google.common.base.CharMatcher
at com.google.common.base.CharMatcher.precomputed(CharMatcher.java:684)
at com.google.common.base.CharMatcher.<clinit>(CharMatcher.java:63)
at com.google.common.base.Splitter.on(Splitter.java:129)
at com.android.sdklib.internal.build.SymbolWriter.write(SymbolWriter.java:51)
at com.android.ant.AaptExecTask.execute(AaptExecTask.java:711)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
at com.android.ant.IfElseTask.execute(IfElseTask.java:120)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:398)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.Main.runBuild(Main.java:809)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

最佳答案

关于目标 API 与最低 API 级别的 SDK 错误实际上是 Android SDK 如何编译您的代码的错误。至于使用较旧的 SDK/编译器来忽略 float3 问题,请不要这样做。这实际上是旧编译器和设备的错误,因为 float3 对齐/打包处理不当。旧设备的正确解决方案是使用 float4(在所有设备上都可以正常工作)。如果您使用 r15 中的旧版编译器,您最终会得到仅适用于某些旧版设备子集的代码。

关于android - 为 pre honeycomb 构建渲染脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13585214/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com