I am trying to make an app for screenshot. I've found there are several guides for using MediaProjectionManager
for that purpose.
This is one of them.
http://www.truiton.com/2015/05/capture-record-android-screen-using-mediaprojection-apis/
I copied the source exactly but the Android studio just can't handle the MediaProjectionManager
.
These are the build error messages.
Error:(23, 32) error: package android.media.projection does not exist
Error:(24, 32) error: package android.media.projection does not exist
Error:(32, 13) error: cannot find symbol class MediaProjectionManager
Error:(35, 13) error: cannot find symbol class MediaProjection
Error:(171, 66) error: package MediaProjection does not exist
And these are the lines that are causing the error.
import android.media.projection.MediaProjection;
import android.media.projection.MediaProjectionManager;
I'm sure these class paths for MediaProjection
and MediaProjectionManager
are correct. A little help please.