Wednesday, August 1, 2012

[android-developers] can't find the deactivate() function on MemoryFile class

Hi,

I'm importing this project from another file, and everything else goes well except for this strange piece of code snippet

CODE: SELECT ALL
               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 documentation, deactivateand fromMemoryFile functions exist.
But the SDK can't seem to find them, or the android.jar doesn't seem to contain them.

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 received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment