2
我试图编译我的renderScript,但我一直有问题的Android的renderScript载体,这是我的代码部分:尺寸3
typedef struct __attribute__((packed, aligned(4))) Particle {
float3 position;
float offsetX;
} Particle_t;
typedef struct VertexColor_s {
float3 position;
float offsetX;
float4 color;
} VertexColor;
VertexColor* vertexColors;
Particle_t *dotParticles;
Particle_t *beamParticles;
当我尝试用Eclipse编译它,我得到这些错误时,定义一个3个变量:
error: structs containing vectors of dimension 3 cannot be exported at this API level: 'vertexColors'
error: structs containing vectors of dimension 3 cannot be exported at this API level: 'dotParticles'
error: structs containing vectors of dimension 3 cannot be exported at this API level: 'beamParticles'
我已设置:
<uses-sdk android:minSdkVersion="13"
android:targetSdkVersion="13"/>
任何想法?
你为什么瞄准API等级13?这是一个限制,因为API级别13的设备在任何3元素向量类型的结构布局中都有一个错误。如果你选择14,你的代码应该编译/运行得很好。 –
哇,谢谢,它工作!把它写成答案,我会接受它。谢谢!!!!! – BamsBamx
没问题。我没有意识到我发布了评论,直到你的回复。我打算把它作为答案。 –