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
沒問題。我沒有意識到我發佈了評論,直到你的回覆。我打算把它作爲答案。 –