Reputation: 3657
I'm using netbeans 8.0 and want to build HTML 5 cordova app. How to build release apk?
Upvotes: 3
Views: 3222
Reputation: 15932
The procedure is explained in this link.
You must edit the netbeans file nbproject/build.xml
and add this line:
<arg value="--release"/>
inside the <target name="build-android">
tag (be careful, there are more than one <target>
, put it in the build-android
one).
The result is something like this:
<target name="build-android" depends="create-android,update-plugins">
<echo level="info" message="${cordova.command} -d build android"/>
<exec executable="${cordova.command}" resolveexecutable="true" searchpath="true" failonerror="true">
<env key="${cordova.path.key}" path="${cordova.path.value}:${android.sdk.home}/tools:${android.sdk.home}/platform-tools:${jdk.home}/bin:${ant.home}/bin:${jdk.home}/bin"/>
<env key="JAVA_HOME" path="${jdk.home}"/>
<arg value="-d"/>
<arg value="build"/>
<arg value="android"/>
<arg value="--release"/>
</exec>
</target>
After this, just recompile your project.
Upvotes: 2
Reputation: 1163
You have to compile your cordova application, on your device or emulator. then you have to find the folder: Documents\NetBeansProjects\Ro\platforms\android\ant-build
inside this folder there is the apk file.
Upvotes: 0