简体   繁体   English

RenderScript支持库V8无法编译

[英]RenderScript support library V8 fail to compile

My platform information OS: Windows 7 32 bit ADT version: Build: v22.2.1-833290 SDK Tools version: 22.2.1 SDK Built-tools version: 18.1 我的平台信息OS:Windows 7 32位ADT版本:Build:v22.2.1-833290 SDK Tools版本:22.2.1 SDK内置工具版本:18.1

I was trying to get the new Renderscript support library v8 to work. 我试图让新的Renderscript支持库v8工作。 I created an android application using API level 18 as the target SDK and compile SDK, API level 17 as the minimum required SDK. 我创建了一个使用API​​级别18作为目标SDK的Android应用程序,并编译SDK,API级别17作为最低要求的SDK。 I then followed the steps in the following links to configure my project, http://android-developers.blogspot.hk/2013/09/renderscript-in-android-support-library.html , http://developer.android.com/guide/topics/renderscript/compute.html#access-rs-apis . 然后,我按照以下链接中的步骤配置我的项目, http://android-developers.blogspot.hk/2013/09/renderscript-in-android-support-library.html,http//developer.android。 com / guide / topics / renderscript / compute.html#access-rs-apis

After I added 我加了之后

renderscript.target=18
renderscript.support.mode=true
sdk.buildtools=18.1.0

into the file "project.properties", I added an empty .rs file into the src folder (under my package, just like usual). 在文件“project.properties”中,我将一个空的.rs文件添加到src文件夹中(在我的包下,就像通常一样)。 Then I received the following error message. 然后我收到以下错误消息。

[2013-09-22 22:32:32 - aaaaa] <invalid>: error: missing pragma for version in source file
[2013-09-22 22:32:32 - aaaaa] <invalid>: error: missing "#pragma rs java_package_name(com.foo.bar)" in source file
[2013-09-22 22:32:32 - aaaaa] C:\Work\SDK\adt-bundle-windows-x86-20130917\sdk\build-tools\android-4.3\arm-linux-androideabi-ld.exe: fatal error: C:\Users\rensijie\workspace\aaaaa\bin\rsObj\armeabi-v7a\test.o: attempt to map 40 bytes at offset 1616 exceeds size of file; the file may be corrupt
[2013-09-22 22:32:32 - aaaaa] C:\Users\rensijie\workspace\aaaaa\bin\rsObj\mips\test.o: file not recognized: File format not recognized
[2013-09-22 22:32:32 - aaaaa] C:\Work\SDK\adt-bundle-windows-x86-20130917\sdk\build-tools\android-4.3\i686-linux-android-ld.exe: error: C:\Users\rensijie\workspace\aaaaa\bin\rsObj\x86\test.o: section name section has wrong type: 2097152
[2013-09-22 22:32:32 - aaaaa] C:\Work\SDK\adt-bundle-windows-x86-20130917\sdk\build-tools\android-4.3\i686-linux-android-ld.exe: fatal error: C:\Users\rensijie\workspace\aaaaa\bin\rsObj\x86\test.o: attempt to map 46661632 bytes at offset 0 exceeds size of file; the file may be corrupt

Since I understand the meaning of the first two error message, I added 由于我理解了前两个错误消息的含义,我补充道

#pragma version(1)
#pragma rs java_package_name(com.example.aaaaa)

to the file. 到文件。

While the first two error message went away, the following error message appeared again and I can't get rid of it by adding/modifying the content of the script (eg I copied a previously working script and it won't work now). 当前两个错误消息消失时,再次出现以下错误消息,我无法通过添加/修改脚本内容来摆脱它(例如,我复制了以前工作的脚本,现在它将无法正常工作)。 However, I observed that the corresponding .java script file in the gen folder was created properly (with import android.support.v8.renderscript.*; inside). 但是,我观察到gen文件夹中相应的.java脚本文件是正确创建的(使用import android.support.v8.renderscript。*; inside)。

[2013-09-22 22:34:29 - aaaaa] C:\Work\SDK\adt-bundle-windows-x86-20130917\sdk\build-tools\android-4.3\arm-linux-androideabi-ld.exe: fatal error: C:\Users\rensijie\workspace\aaaaa\bin\rsObj\armeabi-v7a\test.o: attempt to map 40 bytes at offset 1616 exceeds size of file; the file may be corrupt
[2013-09-22 22:34:30 - aaaaa] C:\Users\rensijie\workspace\aaaaa\bin\rsObj\mips\test.o: file not recognized: File format not recognized
[2013-09-22 22:34:30 - aaaaa] C:\Work\SDK\adt-bundle-windows-x86-20130917\sdk\build-tools\android-4.3\i686-linux-android-ld.exe: error: C:\Users\rensijie\workspace\aaaaa\bin\rsObj\x86\test.o: section name section has wrong type: 2097152
[2013-09-22 22:34:30 - aaaaa] C:\Work\SDK\adt-bundle-windows-x86-20130917\sdk\build-tools\android-4.3\i686-linux-android-ld.exe: fatal error: C:\Users\rensijie\workspace\aaaaa\bin\rsObj\x86\test.o: attempt to map 46661632 bytes at offset 0 exceeds size of file; the file may be corrupt
[2013-09-22 22:34:30 - aaaaa] C:\Work\SDK\adt-bundle-windows-x86-20130917\sdk\build-tools\android-4.3\arm-linux-androideabi-ld.exe: error: C:\Users\rensijie\workspace\aaaaa\bin\rsObj\armeabi-v7a\test2.o: section name section has wrong type: 469762048
[2013-09-22 22:34:30 - aaaaa] C:\Work\SDK\adt-bundle-windows-x86-20130917\sdk\build-tools\android-4.3\arm-linux-androideabi-ld.exe: fatal error: C:\Users\rensijie\workspace\aaaaa\bin\rsObj\armeabi-v7a\test2.o: attempt to map 3103784960 bytes at offset 0 exceeds size of file; the file may be corrupt
[2013-09-22 22:34:30 - aaaaa] C:\Users\rensijie\workspace\aaaaa\bin\rsObj\mips\test2.o: file not recognized: File format not recognized
[2013-09-22 22:34:30 - aaaaa] C:\Work\SDK\adt-bundle-windows-x86-20130917\sdk\build-tools\android-4.3\i686-linux-android-ld.exe: error: C:\Users\rensijie\workspace\aaaaa\bin\rsObj\x86\test2.o: section name section has wrong type: 7168
[2013-09-22 22:34:30 - aaaaa] C:\Work\SDK\adt-bundle-windows-x86-20130917\sdk\build-tools\android-4.3\i686-linux-android-ld.exe: fatal error: C:\Users\rensijie\workspace\aaaaa\bin\rsObj\x86\test2.o: attempt to map 39168 bytes at offset 0 exceeds size of file; the file may be corrupt

In eclipse, there's a red cross on the project name, indicating there's something wrong in the project. 在eclipse中,项目名称上有一个红叉,表示项目中存在错误。 If I try to run the application, eclipse will prompt "Your project contains error(s), please fix them before running your application". 如果我尝试运行该应用程序,eclipse将提示“您的项目包含错误,请在运行您的应用程序之前修复它们”。 However, other than the error message I got, and the red cross on the project name, there's no error in any of the java file (no red crosses on the java files) 但是,除了我得到的错误消息和项目名称上的红叉之外,任何java文件都没有错误(java文件上没有红色交叉)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM