Capacitor 3 not registereing plugin automatically in MainActivity

I have upgraded from capacitor 2 to capacitor 3 . The issue I am facing on both plugins push notifications and background geolocation . Getting same error that is “Plugin not implemented for android”

According to the docs it should automatically register in MainActivity.java file but that is not happening I have to remove init method from that file

package siloc.xyz;

import android.os.Bundle;

import com.getcapacitor.BridgeActivity;
import com.getcapacitor.Plugin;

import java.util.ArrayList;
import com.hemangkumar.capacitorgooglemaps.CapacitorGoogleMaps;
import com.getcapacitor.community.bglocation.BackgroundGeolocation;
public class MainActivity extends BridgeActivity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
}

}

What is the problem here?