Not a specific AndroidManifest class

I get an error with a non-specific class when I add Activity to AndroidManifest. Please help me figure out the problem by removing the abstract class for this operation, but that will not solve it.

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; } } 
+5
source share
1 answer

You do not need to declare abstract superclasses in the manifest

In the manifest, you need to include the activity classes that you are going to create, for example, using Intent.

If your abstract class exists only for a subclass of other actions (subclasses), you need to add these actions to the manifest.

If your class does not have subclasses, remove abstract from your class declaration:

 public class MapsActivity extends FragmentActivity implements OnMapReadyCallback { 

And also remove your abstract method:

 protected abstract void startDemo(); 
+6
source

Source: https://habr.com/ru/post/1247034/


All Articles