Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Whenever I try to run the Google Map API v2 project it shows the following error
"The Google Play services resources were not found. Check your project configuration to ensure that the resources are included."
Actually I was trying to add a marker to a specific location whenever clicked on a List Item but I don't see any markers instead I get the App stopped working message in the device. I then checked on the sdk manager and there was an update available for Google Play Services and I downloaded it but also the error is there. So please anyone help.
Posted
Comments
ZurdoDev 12-Aug-13 11:09am    
Google helps.
Amanpreet Mukker 12-Aug-13 11:27am    
did you include the jar in your project ?
or
the play store app on your phone needs to be updated
theanilpaudel 12-Aug-13 11:34am    
yes, the android support v4.jar file is included and I think the play store of my device is also up to date
Amanpreet Mukker 12-Aug-13 12:09pm    
Take a look here: http://stackoverflow.com/questions/15461345/google-play-services-and-version-2-of-the-google-maps-android-api-authorization
theanilpaudel 12-Aug-13 12:23pm    
not happening

1 solution

Better check first whether your phone provides correct Google play service or not with this code..
Java
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GooglePlayServicesUtil;

import android.app.AlertDialog;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.Toast;

public class MainActivity extends FragmentActivity {
 
 final int RQS_GooglePlayServices = 1;

 @Override
 protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_main);
 }
 
 @Override
 public boolean onCreateOptionsMenu(Menu menu) {
  // Inflate the menu; this adds items to the action bar if it is present.
  getMenuInflater().inflate(R.menu.activity_main, menu);
  return true;
 }

 @Override
 public boolean onOptionsItemSelected(MenuItem item) {
  switch (item.getItemId()) {
     case R.id.menu_legalnotices:
      String LicenseInfo = GooglePlayServicesUtil.getOpenSourceSoftwareLicenseInfo(
        getApplicationContext());
      AlertDialog.Builder LicenseDialog = new AlertDialog.Builder(MainActivity.this);
      LicenseDialog.setTitle("Legal Notices");
      LicenseDialog.setMessage(LicenseInfo);
      LicenseDialog.show();
         return true;
     }
  return super.onOptionsItemSelected(item);
 }

 @Override
 protected void onResume() {
  // TODO Auto-generated method stub
  super.onResume();

  int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(getApplicationContext());
  
  if (resultCode == ConnectionResult.SUCCESS){
   Toast.makeText(getApplicationContext(), 
     "isGooglePlayServicesAvailable SUCCESS", 
     Toast.LENGTH_LONG).show();
  }else{
   GooglePlayServicesUtil.getErrorDialog(resultCode, this, RQS_GooglePlayServices);
  }
  
 }

}

This will check everything you need to support v2 map and if your mobile are not then it prompts to download from google play.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900