Skip to main content

Featured

Android studio “SDK tools directory is missing”

Following 2 possible solutions will resolve this problem :  Solution1 : To fix the problem, it was required that I list the path to my corporate PAC file by using  Configure -> "Appearance and Behavior" -> System Settings -> HTTP Proxy . I selected "Automatic proxy configuration url:" Delete your  ~/.Android*  folders (losing all of your settings :/). Run Android Studio. It will show you a welcome wizard where it tries to download the SDK again (and fails due to my rubbish internet). Click the X on the wizard window. That will enable you to get to the normal welcome dialog. Go to Settings->Project Defaults->Project Structure and change the Android SDK location to the correct one. Solution 2 : To fix the problem, it was required that I list the path to my corporate PAC file by using  Configure -> "Appearance and Behavior" -> System Settings -> HTTP Proxy . I selected "Automatic proxy configuration url:...

code to convert time from 24 hour to 12 hour format..(Because GMT time will be allways in 24Hour format),Android




String finalTime="16:26:26";

DateFormat f1 = new SimpleDateFormat("hh:mm:ss");
        Date d = null;
        try {
            d = f1.parse(finalTime);
        } catch (ParseException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        DateFormat f2 = new SimpleDateFormat("h:mma");
        String str=f2.format(d).toLowerCase(); // "12:18am"
        System.out.println("######str#######"+str);


//adding two times use:
http://www.java-forums.org/new-java/14549-addition-two-time.html
http://www.coderanch.com/t/401782/java/java/Adding-Times-Together

Comments