Method 1: Android studio only has a shortcut key for importing a single package: Alt+Enter.
Method 2: Set up automatic import of all packages
Click File→Setting, Setting→Editor→General→Auto Import, check Add unambiguous imports on the fly to automatically import the package , click apply→OK