Could not find class 'com.google.android.gms.location.internal.ParcelableGeofence referenced from method glt.a

前端 未结 3 664
离开以前
离开以前 2020-12-17 04:05

I have an app where homepage is map.

Do not know why i am getting this error and along with this error Could not find class \'gpr\', referenced from method gps

3条回答
  •  春和景丽
    2020-12-17 04:27

    I show you how I solved the same problem you have.

    First of all, I cleaned all sdk and I downloaded again Google Play Services lib. Then I removed .android folder of my computer and I regenerated my debug.keystore.

    After that, I just get my new SHA1 to obtain my Google Maps V2 Api Key.

    After update my apikey, let's see how I change my code.

    Now I use fragment with MapFragment insted of MapView in your xml layout.

        
    
        
    
     
    

    And use FragmentManager to locate it:

        public class MapsActivity extends Activity
    {
        private GoogleMap map;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) 
        {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_map);
    
            // Gets the MapView from the XML layout and creates it
            map = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();
            map.getUiSettings().setMyLocationButtonEnabled(false);
            //map.setMyLocationEnabled(true);
            map.setOnMapClickListener(this);
            map.setOnMapLongClickListener(this);
            try 
            {
                MapsInitializer.initialize(MapsActivity.this);
            } 
            catch (Exception e) 
            {
                e.printStackTrace();
            }
        }
    

    I hope that's helpfull and sorry if my english is so bad, regards

提交回复
热议问题