The dependency
implementation 'com.hzy:libp7zip:1.7.0'
is now
implementation 'com.github.hzy3774:AndroidP7zip:v1.7.2'
Accordingly the correct import for accessing the P7ZipApi class would be:
import com.hzy.libp7zip.P7ZipApi;
Refer to the author's library: