Can't find setSurface method in Allocation support v8

121 views Asked by At

I'm working on livePreview example of renderScript android. the example is working fine with api 19 then I tried it with support library v8 but I cannot find the method setSurface of Allocation class. Every thing else is fine.

I tried all build tools other then obsolete. Build Tool build tools 22.0.1 - 19.0.1

1

There are 1 answers

0
Larry Schiefer On

Check what version of the support library you are building against rather than the Build Tools. You'll most likely need support library 21.0.1 or newer. The rev notes don't explicitly show it as a change. But, the git history on the support libraries show that the Allocation.setSurface() method in the v8 class wasn't added until 11/06/2014. This corresponds to around the 21.0.1 timeframe. That being said, it may not have been released until support library 22 or newer. Your best bet is to build against the latest support library release.