Skip to main content

Installing and setting up Android Developer Tools in Ubuntu 13.10





1. Check whether your Ubuntu is running 32bit or 64 bit OS. In terminal window, type in

                     uname –m
        

  • If the response is i686, you have a 32-bit version of Linux.
  • If the response is x86_64, you have a 64-bit version of Linux.


2. Download Android Developer Tool and extract anywhere you want and rename it with no space.

           /Home/ADT

3. Download Java Runtime Environment (JRE) extract inside eclipse directory of your Android Developer Tool and rename it to jre.

          /Home/ADT/eclipse/jre


If your are running Ubuntu with 64 bit system, it is required to install  lib32z1 lib32ncurses5 lib32bz2-1.0 to avoid this error: /home/username/ADT/sdk/platform-tools/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory

      Install ia32-libs via terminal : sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6

4. If java is not installed you will encounter this errors:


       ./android: 1: ./android: java: not found
       ./android: 1: ./android: java: not found
       ./android: 110: exec: java: not found

         Install Java via terminal :   sudo apt-get install openjdk-7-jdk

          or

    You can install Oracle Java 8 (JDK8 and JRE8) In Ubuntu 14.04, 13.10, 12.10, 12.04 and 10.04 Via PPA 

    Add the webupd8team PPA repository and install Oracle Java 7/8 using the following commands:


install Oracle Java 7


                sudo add-apt-repository ppa:webupd8team/java                

                sudo apt-get update               
                sudo apt-get install oracle-java7-installer 

install Oracle Java8


              sudo add-apt-repository ppa:webupd8team/java              

              sudo apt-get update             
              sudo apt-get install oracle-java8-installer


4. Open ADT click eclipse inside /Home/ADT/eclipse/eclipse
       


5. As you continue developing apps, you may need to install additional versions of Android for the emulator and other packages such as the library for Google Play In-app Billing. To install more packages, use the SDK ManagerOpen SDK Manager and install packages you need.



        Read more about recommended packages here : http://developer.android.com/tools/help/sdk-manager.html

        Tools
        Android 4.0 +
        Extras



Post a Comment

Popular posts from this blog

CakeAdminLTE is based on AdminLTE Theme for CakePHP 2.4+

CakeAdminLTE v.1.0 CakeAdminLTE is based on Twitter Bootstrap 3.0+ and AdminLTE Theme for CakePHP 2.4+


AdminLTE Dashboard and Control Panel Template Responsive admin template Free & open source Built with Bootstrap 3 Easy to customize Quick StartDownload the .zip fileExtract the files into your CakePHP folderTo enable your theme add the following to your "app/Controller/AppController.php" class:public$theme="CakeAdminLTE";IMPORTANT: If you would like to bake your app, please make sure you have enabled the theme before baking. DOWNLOAD: CakeAdminLTE

CakePHP: COUNT data and GROUP BY date

Goal: Count Tip Offs created per day for a month to use for graph
Problem: created field name is in datetime format: Y-m-d H:i:s
Solution: format SQL Query date: DATE_FORMAT(TipOff.created, '%Y-%m-%d')





Inside the function of controller
<?php$tipOffsMonthly=$this->TipOff->find('all', array('conditions'=>array('AND'=>array('TipOff.electric_cooperatives_id'=>AuthComponent::User('electric_cooperatives_id'), 'TipOff.created BETWEEN ? AND ?'=>array($first_day, $last_day))), 'fields'=>array("COUNT('created') as per_day", 'created'), 'group'=>array("DATE_FORMAT(TipOff.created, '%Y-%m-%d')") ));?>

CakePHP: Calling function from other controller

Import Controller of the function you want to use.

Once you imported  the controller you can call any function of this controller.

<?php//Import controller  App::import('Controller','SmsOutgoings');class ReportsController extends AppController {publicfunctionadd(){$message="Notification: New report submitted!";//Instantiation$SmsOutgoings=new SmsOutgoingsController;//Call a method from SmsOutgoingsControllerwith parameter$SmsOutgoings->notify_user($user_id,$message);}}?> Other way is by using the requestAction() function
<?phpclass ReportsController extends AppController {publicfunctionadd(){$message="Notification: New report submitted!";//Call a method from SmsOutgoingsController with parameter$this->requestAction('/sms_outgoings/notify_user',array($user_id,$message))