简体   繁体   English

Renderscript问题动​​态壁纸Android

[英]Renderscript issue live wallpaper Android

I've just opened the source for a live wallpaper app in eclipse. 我刚刚在Eclipse中打开了动态壁纸应用程序的源代码。 It is a wallpaper which is included in the CM11 sources, so I know it should compile fine, however, in eclipse I get the "Import cannot be resolved" error on the following imports: 它是CM11源文件中包含的墙纸,因此我知道它应该可以很好地编译,但是,在eclipse中,出现以下导入上的“导入无法解决”错误:

import android.renderscript.RenderScriptGL;
import android.renderscript.ProgramStore.*;

The last import isn't literally that, the * is either BlendDstFunc, BlendSrcFunc or DepthFunc, but the error is about the ProgramStore part of the declaration. 最后一次导入并不是字面上的意思,*是BlendDstFunc,BlendSrcFunc或DepthFunc,但是错误与声明的ProgramStore部分有关。 All other android.renderscript includes are recognized just fine since I've set the enivironment to build using API level 20. I read somewhere that these functions are deprecated, but if that's the problem I would expect a deprecated warning, not these errors. 因为我已经将环境设置为使用API​​级别20进行构建,所以所有其他android.renderscript都可以被很好地识别。我在某处读到这些功能已被弃用,但是如果这是一个问题,我希望它已弃用警告,而不是这些错误。 I can see both the RenderScriptGL.java and the ProgramStore.java files in the /android/renderscript folders of the sdk and all the other imports for renderscript are working fine. 我可以在sdk的/ android / renderscript文件夹中看到RenderScriptGL.java和ProgramStore.java文件,并且所有其他renderscript导入都可以正常工作。 What's going on here? 这里发生了什么? If it is a deprecated class, what are the alternatives? 如果它是已弃用的类,则有哪些替代方法? Thanks in advance! 提前致谢!

ProgramStore is marked @hide, and thus is not a public API (nor has it ever been public). ProgramStore标记为@hide,因此不是公共API(也从未公开)。 RenderScriptGL is deprecated (as you mentioned), but it still works. RenderScriptGL已弃用(如您所述),但仍然可以使用。

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

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