I’m importing this project from another file, and everything else goes well except for this strange piece of code snippet
MemoryFile memoryFile = new MemoryFile(null, length);
memoryFile.writeBytes(buffer, 0, 0, length);
memoryFile.deactivate();
return AssetFileDescriptor.fromMemoryFile(memoryFile);
eclipse complains that deactivate function does not exist in the MemoryFile class,
as well as AssetFileDescriptor not having the fromMemoryFile function.
This is strange because according to the following links, deactivate and fromMemoryFile functions exist.
But the SDK can’t seem to find them, or the android.jar doesn’t seem to contain them.
The real strange thing is that the two functions “don’t exist” in the ‘Official Android Documentation’.
I changed the “Project Build Target” on Properties->Android from Android 2.1 to 2.3 but the problem persists.
I also did a wide search on the net, but oddly enough, “nobody” has ever asked on the same problem.
Any advice?
Thanks.
You are probably copying the code from some internal classes. The
deactivate()andfromMemoryFile()are hidden apis (annotated with@hidein the source) and not meant for application developers to use.