Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create apk file in command line?

I was using eclipse ide to build apk file . Now i want to create apk file in command line in linux. But when i say ant debug it gives following error :

Unable to obtain resource from anttasks.jar
  java.util.zip.ZipException : error in opening zip file

Problem : failed to create task or type checkenv 
Cause : The name is undefined 
Action : Check the spelling
Action : Check that any custom tasks/types have been declared
Action : Check that any <presetdef>/<macrodef> declarations have taken place

I have ant version 1.9.2 . and android version 17. I have build.xml file .

Edit : I changed my ant version into 1.8.0 , But whatever i do still i am getting those failed to create task or type checkenv error .

like image 292
SSS Avatar asked Sep 12 '13 03:09

SSS


People also ask

How do I make an APK file?

In the Android menu, go to Build > Build Bundle(s) / APK (s) > Build APK(s). Android Studio will start building the APK for you. Once done, a pop-up on the bottom right will notify you of its completion.

What is Gradle build command?

The Gradle build is a process of creating a Gradle project. When we run a gradle command, it will look for a file called build. gradle in the current directory. This file is also called the Gradle build script. The build configuration, tasks, and plugins are described in this file.


1 Answers

Check this following developer link

http://developer.android.com/tools/building/building-cmdline.html

like image 113
Nikhil Virupakshi Avatar answered Oct 04 '22 22:10

Nikhil Virupakshi