Check this answer.
It seems that maybe you have your google play services api outdated.
EDIT: i.n.e.f has solved it after by adding Google Play Services to Build Path
Вопрос
I have map & i am trying to get the snapshot of Map on Button click.
/**
* Called when the snapshot button is clicked.
*/
public void onScreenshot(View view) {
takeSnapshot();
}
private void takeSnapshot() {
System.out.println("Take SnapShot.......##################");
if (map == null) {
return;
}
final SnapshotReadyCallback callback = new SnapshotReadyCallback() {
@Override
public void onSnapshotReady(Bitmap snapshot) {
// Callback is called from the main thread, so we can modify the ImageView safely.
image.setImageBitmap(snapshot);
}
};
map.setOnMapLoadedCallback(new OnMapLoadedCallback() {
@Override
public void onMapLoaded() {
map.snapshot(callback);
}
});
}
I am getting Error on this line
final SnapshotReadyCallback callback = new SnapshotReadyCallback()
The below is my stacktrace.
Please help i am trying from last two days.
Решение
Check this answer.
It seems that maybe you have your google play services api outdated.
EDIT: i.n.e.f has solved it after by adding Google Play Services to Build Path