Пытаюсь получить текущее время
Date date = new Date();
CharSequence date1 = DateFormat.format("HHmm", date);
И дальше превратить в int значение, в итоге при присвоении int переменной выходит ошибка, потому что часы не отображаются вместо них так и остается HH. Код ошибки:
java.lang.NumberFormatException: Invalid int: "HH26" at java.lang.Integer.invalidInt(Integer.java:138) at java.lang.Integer.parse(Integer.java:375) at java.lang.Integer.parseInt(Integer.java:366) at java.lang.Integer.parseInt(Integer.java:332) at tat.example.ildar.seer.Main_Activity$MyLocationListener.onLocationChanged(Main_Activity.java:904) at android.location.LocationManager$ListenerTransport._handleMessage(LocationManager.java:257) at android.location.LocationManager$ListenerTransport.access$000(LocationManager.java:186) at android.location.LocationManager$ListenerTransport$1.handleMessage(LocationManager.java:202) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:176) at android.app.ActivityThread.main(ActivityThread.java:5319) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869) at dalvik.system.NativeStart.main(Native Method)
java.text.DateFormat
нет методаformat
с приведенными Вами типами аргументов.