My Requirement to create the .apk from my code without using android studio and eclipse. My code is on svn.
-
2may be duplicate check this out http://stackoverflow.com/questions/8605821/how-to-run-apk-from-commandline-in-emulator – Khizar Hayat Mar 01 '16 at 10:15
-
no that is different and my requirement is different. – Suresh Mewara Mar 01 '16 at 10:17
-
ok yes you want to make an apk . and link is about to run apk. – Khizar Hayat Mar 01 '16 at 10:18
2 Answers
This can be done with Apache ANT. You can download it from here: Apache ANT Home Page
Follow this link here to get everything set up to use ANT.
Once you have ANT installed and setup, navigate to your project folder and type
ant release
This will create a debug release for you to test on a real device. If you would like, you can configure the Android build script to automatically sign and align your application package. To do so, you must provide the path to your keystore and the name of your key alias in your project’s ant.properties file. With this information provided, the build script will prompt you for your keystore and alias password when you build in release mode and produce your final application package, which will be ready for distribution.
To specify your keystore and alias, open the project ant.properties file (found in the root of the project directory) and add entries for key.store and key.alias as below
key.store=<App-Name>.keystore
key.alias=Alias-Name
Save your changes then type this in the command prompt
ant release
Enter your keystore and alias passwords when prompted.
More advanced info can be found here

- 1,333
- 3
- 19
- 50
- Add JAVA_HOME (Jdk path )
- Add Ant path
- Add sdk path
Then open command prompt set the location of your project,
gradlew.bat assembleDebug
after building you can see apk at build location of your project.

- 129
- 5