In Android API 21 they added android.hardware.camera2.params.StreamConfiguration
but for some reason Android Studio can't find it.
Also this class ( android.hardware.camera2.params.StreamConfigurationMap
) has a public constructor and yet it says I can't create an instance of it outside its package. Why?!
Tried this:
StreamConfigurationMap map = new StreamConfigurationMap(); //Says can only be instantiated in its package
StreamConfiguration map = new StreamConfiguration(); //can't find StreamConfiguration
StreamConfigurationMap
does not have a public constructor.
The android.hardware.camera2.params
package does not expose the StreamConfiguration
class. StreamConfigurationMap
does allow you to use a StreamConfiguration
to obtain a configuration- the configurations available are documented here .
The StreamConfiguration
class and the StreamConfigurationMap
constructor are hidden from the public Android API using the @hide
annotation, so you cannot use them.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.