apkBuilder.addNativeLibraries( nativeFolder ); apkBuilder.sealApk();
/** * Builds the {@code sourceApk} with bytecode merged from {@code classesDex}. The built .apk file has the same * name as {@code sourceApk} and is put in {@code outputDir}.<br/> * <br/> * <b>Precondition:</b> The {@code sourceApk} doesn't contain {@code classes.dex}, so the {@code classesDex} can be * merged into it. */ private static File buildApk(File sourceApk, File classesDex, File outputDir) throws Exception { File outputApk; try { outputApk = new File(outputDir, sourceApk.getName()); ApkBuilder builder = new ApkBuilder(outputApk, sourceApk, classesDex, ApkBuilder.getDebugKeystore(), null); builder.sealApk(); } catch (ApkCreationException e) { throw new Exception(e); } catch (SealedApkException e) { throw new Exception(e); } return outputApk; }
builder.sealApk();
builder.sealApk(); } catch(Exception e) { System.out.println(editor.getResources().getString(R.string.build_building_apkbuilder_failed));