اینو به انتهای منی فست اضافه کنید
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
روی دستگاه واقعی تست کنید. اولا هم گوگل پلی نسخه جدید رو روی دستگاه نصب و برنامتون رو اجرا کنید.
کد داخل کلاس باید اینطوری باشه:
public class NewMap extends Activity {
private GoogleMap map;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
map = ((MapFragment) getFragmentManager().findFragmentById(R.id.map))
.getMap();
{
اینم لی اوت:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<fragment
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="com.google.android.gms.maps.MapFragment"/>
</RelativeLayout>
اگه نشد بگید تا کلا بررسی کنیم