I am getting an error with not a concrete class when I add the Activity in the AndroidManifest. Please help me figure out the problem by removing abstract class for the activity but it doesn't resolve.
public abstract class MapsActivity extends FragmentActivity implements OnMapReadyCallback {
private GoogleMap mMap;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.map_fragment);
setUpMap();
}
@Override
protected void onResume() {
super.onResume();
setUpMap();
}
@Override
public void onMapReady(GoogleMap map) {
if (mMap != null) {
return;
}
mMap = map;
startDemo();
}
private void setUpMap() {
((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)).getMapAsync(this);
}
/**
* Run the demo-specific code.
*/
protected abstract void startDemo();
protected GoogleMap getMap() {
return mMap;
}
}
You don't need declare abstract
super classes in your manifest
In your manifest you only need to include Activity classes that you are going to instantiate for example with an Intent.
If your abstract class only exists to subclass other Activities ( subclasses ) then you need to add those Activities in the Manifest.
If your class doesn't have subclasses then remove abstract
from your class declaration :
public class MapsActivity extends FragmentActivity implements OnMapReadyCallback {
And remove also your abstract method :
protected abstract void startDemo();