I decided to try adding licenses to the application. Followed this instruction: link to instruction
I did everything as it was written, but here’s the 5th point of the instruction, it still does not work. Writes:
Error: Cannot resolve method 'show (android.app.FragmentManager, java.lang.String)'
It does not work to solve the problem. The instruction of the beginning of 2016. Maybe in the 2018th you need to write something different?
Question: how to write so that errors do not occur?
UPD1:
If you replace getFragmentManager() with getSupportFragmentManager() , then this situation occurs: 
Error: Cannot resolve method 'getSupportFragmentManager ()'
UPD2:
In LicensesDialogFragment:
import android.app.AlertDialog; import android.app.Dialog; import android.support.v4.app.FragmentActivity; import android.support.v4.app.FragmentManager; import android.support.v4.app.DialogFragment; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.v4.app.DialogFragment; import android.view.LayoutInflater; import android.webkit.WebView; public class LicensesDialogFragment extends DialogFragment { public static LicensesDialogFragment newInstance() { return new LicensesDialogFragment(); } @NonNull @Override public Dialog onCreateDialog(Bundle savedInstanceState) { WebView view = (WebView) LayoutInflater.from(getActivity()).inflate(R.layout.dialog_license, null); view.loadUrl("file:///android_asset/open_source_licenses.html"); return new AlertDialog.Builder(getActivity(), R.style.Theme_AppCompat_Light_Dialog_Alert) .setTitle(getString(R.string.action_licenses)) .setView(view) .setPositiveButton(android.R.string.ok, null) .create(); } } In Activity with a button:
import android.app.Activity; import android.app.AlertDialog; import android.support.v4.app.FragmentActivity; import android.support.v4.app.FragmentManager; import android.support.v4.app.DialogFragment; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.Button; public class InformationActivity extends Activity { @Override protected void onCreate(final Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.app_information); Button ShowLicensesBtn = (Button)findViewById(R.id.btn_licensesID); ShowLicensesBtn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { displayLicensesDialogFragment(); } }); } private void displayLicensesDialogFragment() { LicensesDialogFragment dialog = LicensesDialogFragment.newInstance(); dialog.show(getFragmentManager(), "LicensesDialog"); } @Override public void onBackPressed() { Intent StartMainActivityIntent = new Intent(InformationActivity.this, MainActivity.class); startActivity(StartMainActivityIntent); finish(); } } 
getFragmentManager()you got agetFragmentManager()method? Judging by the error code is not. - user218976 1:31 pmInformationActivity extends AppCompatActivity- Yura Ivanov