/** * Creates a new instance. * * This creates a new builder that will create the specified output file, using the two * mandatory given input files. * * An optional debug keystore can be provided. If set, it is expected that the store password * is 'android' and the key alias and password are 'androiddebugkey' and 'android'. * * An optional {@link PrintStream} can also be provided for verbose output. If null, there will * be no output. * * @param apkFile the file to create * @param resFile the file representing the packaged resource file. * @param dexFile the file representing the dex file. This can be null for apk with no code. * @param debugStoreOsPath the OS path to the debug keystore, if needed or null. * @param verboseStream the stream to which verbose output should go. If null, verbose mode * is not enabled. * @throws ApkCreationException */ public ApkBuilder(File apkFile, File resFile, File dexFile, String debugStoreOsPath, final PrintStream verboseStream) throws ApkCreationException { SigningInfo info = getDebugKey(debugStoreOsPath, verboseStream); if (info != null) { init(apkFile, resFile, dexFile, info.key, info.certificate, verboseStream); } else { init(apkFile, resFile, dexFile, null /*key*/, null/*certificate*/, verboseStream); } }