shymmq / librus-client

Klient restowego API librusa na androida
https://play.google.com/store/apps/details?id=pl.librus.client
GNU General Public License v3.0
14 stars 3 forks source link

SDK version / API Level too high - doesn't support Android 4.x #123

Closed xeros closed 7 years ago

xeros commented 7 years ago

All my & my family Android devices have Android Jelly Bean (4.2.2), so it's not possible to install your app. When I repacked APK with changed minSdkVersion to 17 (Android 4.2.x) and it installed successfully, but crashes at start.

Would you please decrease API Level for your app?

xeros commented 7 years ago

filtered logcat:

E/cutils ( 4361): to chown(/mnt/shell/emulated/0, 0, 0) E/cutils ( 4361): to chown(/mnt/shell/emulated/obb, 0, 0) E/cutils ( 4361): to chown(/storage/emulated/0/Android, 0, 0) E/cutils ( 4361): to chown(/storage/emulated/0/Android/obb, 0, 0) D/ADB_SERVICES( 2122): Adding socket 50 pid 4361 to jdwp process list W/dalvikvm( 4361): VFY: unable to resolve virtual method 553: Landroid/content/Context;.getExternalFilesDirs (Ljava/lang/String;)[Ljava/io/File; W/dalvikvm( 4361): VFY: unable to resolve virtual method 221: Landroid/app/ActivityManager;.isLowRamDevice ()Z W/dalvikvm( 4361): threadid=1: thread exiting with uncaught exception (group=0x42084af8) W/dalvikvm( 4361): threadid=1: uncaught exception occurred W/System.err( 4361): java.lang.RuntimeException: Unable to instantiate application pl.librus.client.MainApplication: java.lang.ClassNotFoundException: Didn't find class "pl.librus.client.MainApplication " on path: DexPathList[[zip file "/data/app/pl.librus.client-1.apk"],nativeLibraryDirectories=[/data/app-lib/pl.librus.client-1, /vendor/lib, /system/lib]] W/System.err( 4361): at android.app.LoadedApk.makeApplication(LoadedApk.java:504) W/System.err( 4361): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4673) W/System.err( 4361): at de.robv.android.xposed.XposedBridge.invokeOriginalMethodNative(Native Method) W/System.err( 4361): at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:631) W/System.err( 4361): at android.app.ActivityThread.handleBindApplication(Native Method) W/System.err( 4361): at android.app.ActivityThread.access$1300(ActivityThread.java:169) W/System.err( 4361): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1440) W/System.err( 4361): at android.os.Handler.dispatchMessage(Handler.java:107) W/System.err( 4361): at android.os.Looper.loop(Looper.java:194) W/System.err( 4361): at android.app.ActivityThread.main(ActivityThread.java:5463) W/System.err( 4361): at java.lang.reflect.Method.invokeNative(Native Method) W/System.err( 4361): at java.lang.reflect.Method.invoke(Method.java:525) W/System.err( 4361): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:854) W/System.err( 4361): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:621) W/System.err( 4361): at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:132) W/System.err( 4361): at dalvik.system.NativeStart.main(Native Method) W/System.err( 4361): Caused by: java.lang.ClassNotFoundException: Didn't find class "pl.librus.client.MainApplication" on path: DexPathList[[zip file "/data/app/pl.librus.client-1.apk"],nativeLibraryDirectories=[/data/app-lib/pl.librus.client-1, /vendor/lib, /system/lib]] W/System.err( 4361): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:53) W/System.err( 4361): at java.lang.ClassLoader.loadClass(ClassLoader.java:501) W/System.err( 4361): at java.lang.ClassLoader.loadClass(ClassLoader.java:461) W/System.err( 4361): at android.app.Instrumentation.newApplication(Instrumentation.java:1038) W/System.err( 4361): at android.app.LoadedApk.makeApplication(LoadedApk.java:499) W/System.err( 4361): ... 15 more W/dalvikvm( 4361): threadid=1: calling UncaughtExceptionHandler E/AndroidRuntime( 4361): FATAL EXCEPTION: main E/AndroidRuntime( 4361): java.lang.RuntimeException: Unable to instantiate application pl.librus.client.MainApplication: java.lang.ClassNotFoundException: Didn't find class "pl.librus.client.MainApplication" on path: DexPathList[[zip file "/data/app/pl.librus.client-1.apk"],nativeLibraryDirectories=[/data/app-lib/pl.librus.client-1, /vendor/lib, /system/lib]] E/AndroidRuntime( 4361): at android.app.LoadedApk.makeApplication(LoadedApk.java:504) E/AndroidRuntime( 4361): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4673) E/AndroidRuntime( 4361): at de.robv.android.xposed.XposedBridge.invokeOriginalMethodNative(Native Method) E/AndroidRuntime( 4361): at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:631) E/AndroidRuntime( 4361): at android.app.ActivityThread.handleBindApplication(Native Method) E/AndroidRuntime( 4361): at android.app.ActivityThread.access$1300(ActivityThread.java:169) E/AndroidRuntime( 4361): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1440) E/AndroidRuntime( 4361): at android.os.Handler.dispatchMessage(Handler.java:107) E/AndroidRuntime( 4361): at android.os.Looper.loop(Looper.java:194) E/AndroidRuntime( 4361): at android.app.ActivityThread.main(ActivityThread.java:5463) E/AndroidRuntime( 4361): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 4361): at java.lang.reflect.Method.invoke(Method.java:525) E/AndroidRuntime( 4361): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:854) E/AndroidRuntime( 4361): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:621) E/AndroidRuntime( 4361): at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:132) E/AndroidRuntime( 4361): at dalvik.system.NativeStart.main(Native Method) E/AndroidRuntime( 4361): Caused by: java.lang.ClassNotFoundException: Didn't find class "pl.librus.client.MainApplication" on path: DexPathList[[zip file "/data/app/pl.librus.client-1.apk"],nativeLibraryDirectories=[/data/app-lib/pl.librus.client-1, /vendor/lib, /system/lib]] E/AndroidRuntime( 4361): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:53) E/AndroidRuntime( 4361): at java.lang.ClassLoader.loadClass(ClassLoader.java:501) E/AndroidRuntime( 4361): at java.lang.ClassLoader.loadClass(ClassLoader.java:461) E/AndroidRuntime( 4361): at android.app.Instrumentation.newApplication(Instrumentation.java:1038) E/AndroidRuntime( 4361): at android.app.LoadedApk.makeApplication(LoadedApk.java:499) E/AndroidRuntime( 4361): ... 15 more W/ActivityManager( 671): Force finishing activity pl.librus.client/.ui.MainActivity W/ActivityManager( 671): [LTK] pid, app, 3d=4361, 0, 115007488 E/AppErrorDialog( 671): Failed to get ILowStorageHandle instance W/DropBoxManagerService( 671): Dropping: data_app_crash (2158 > 0 bytes) W/AES ( 671): Exception Log handling... I/SurfaceFlinger( 158): EventThread Client Pid (671) created E/AEE/LIBAEE( 671): shell: cant create socket with aed: Connection refused D/GraphicBuffer( 671): create handle(0x7bd4f3d0) (w:640, h:253, f:1) W/ActivityManager( 671): Unable to start service Intent { act=com.google.android.gms.clearcut.service.START pkg=com.google.android.gms } U=0: not found W/ActivityManager( 671): Unbind failed: could not find connection for android.os.BinderProxy@45ba7698 W/ActivityManager( 671): Unable to start service Intent { act=com.google.android.gms.clearcut.service.START pkg=com.google.android.gms } U=0: not found W/ActivityManager( 671): Unbind failed: could not find connection for android.os.BinderProxy@4478cf28 E/RemoteViews( 671): ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search E/RemoteViews( 671): ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search E/RemoteViews( 671): ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search E/RemoteViews( 671): ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search W/ActivityManager( 671): Unable to start service Intent { act=com.google.android.gms.clearcut.service.START pkg=com.google.android.gms } U=0: not found W/ActivityManager( 671): Unbind failed: could not find connection for android.os.BinderProxy@446a89e8 W/ActivityManager( 671): Unable to start service Intent { act=com.google.android.gms.clearcut.service.START pkg=com.google.android.gms } U=0: not found W/ActivityManager( 671): Unbind failed: could not find connection for android.os.BinderProxy@457b9590 E/RemoteViews( 671): ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search E/RemoteViews( 671): ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search W/ActivityManager( 671): Activity pause timeout for ActivityRecord{43bd56d0 u0 pl.librus.client/.ui.MainActivity} E/RemoteViews( 671): ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search E/RemoteViews( 671): ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search E/RemoteViews( 671): ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search W/ContextImpl( 671): Calling a method in the system process without a qualified user: android.app.ContextImpl.startService:1505 com.yulong.android.uitechno.service.YLUIWatchService.startComponent:1597 com.yulong.android.uitechno.service.YLUIWatchService$WatchHandler.handleMessage:1568 android.os.Handler.dispatchMessage:107 android.os.Looper.loop:194 W/ActivityManager( 671): Unable to start service Intent { act=com.yulong.action.YLUIWatchService cmp=com.yulong.android.network.widget/.update.ControlUpdateManagerService } U=0: not found D/GraphicBuffer( 671): create handle(0x7d39c4f8) (w:640, h:253, f:1) W/ContextImpl( 671): Calling a method in the system process without a qualified user: android.app.ContextImpl.startService:1505 com.yulong.android.server.BugReportService$BugReportHandler.handleMessage:218 android.os.Handler.dispatchMessage:107 android.os.Looper.loop:194 com.yulong.android.server.BugReportService$BugReportThread.run:529 D/GraphicBuffer( 671): create handle(0x85247b98) (w:640, h:253, f:1) I/SurfaceTextureClient( 671): [STC::queueBuffer] (this:0x82b15860) fps:1.72, dur:1161.98, max:947.75, min:214.22 W/ActivityManager( 671): Unable to start service Intent { act=com.google.android.gms.ads.identifier.service.START flg=0x10 pkg=com.google.android.gms } U=0: not found W/AlarmManager( 671): setInexactRepeating ignored because interval 0 is invalid E/CellLocation( 671): create GsmCellLocation E/CellLocation( 671): create GsmCellLocation W/InputMethodManagerService( 671): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@438aa6a8 attribute=null, token = android.os.BinderProxy@443844f8 W/ADB_SERVICES( 2122): terminating JDWP 4361 connection: I/O error D/ADB_SERVICES( 2122): remove pid 4361 to jdwp process list D/GraphicBuffer( 671): close handle(0x7bd4f3d0) (w:640 h:253 f:1) D/GraphicBuffer( 671): close handle(0x7d39c4f8) (w:640 h:253 f:1) D/GraphicBuffer( 671): close handle(0x85247b98) (w:640 h:253 f:1) E/RemoteViews( 671): ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search E/RemoteViews( 671): ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search E/RemoteViews( 671): ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search E/RemoteViews( 671): ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search E/RemoteViews( 671): ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search E/RemoteViews( 671): ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search E/RemoteViews( 671): ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search E/RemoteViews( 671): ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search E/RemoteViews( 671): ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search E/RemoteViews( 671): ANR Warning,RemoteViews can only be used once ,if not ,it may cause ANR in hosts such as Laucher,SystemUI. keys for search

mimi89999 commented 7 years ago

The app won't work on older Android versions. You could try installing LineageOS on your device...

xeros commented 7 years ago

It's "no-go" to update Android OS on any of my Chineese devices (phones & tablets) :( LineageOS & other projects (CM, AOSP, MiUI,...) doesn't even have them on the list. I don't want to change our phones as they still have nice hardware (good display, 2GB RAM, 8-core CPUs, fast flash storage,...).

According to log above it doesn't seem to be something really problematic to fix to bring back support for older SDK and I saw in github project code history, it was supporting SDK 19 in the past. Why it was bumped up?

Frioo commented 7 years ago

We have decided not to support devices running Android versions lower than Lollipop (5.0.0) because it lets us focus more on functionality and usage of modern solutions rather than backward compatibility.
In order to support earlier SDK versions it's necessary to ensure all dependencies also support them. We can't be certain that developers of these dependencies do not decide to drop support for old Android versions in the future. If that happened, we would be forced to re-write most of our application just to remove all the legacy-support solutions.
In conclusion, supporting older SDKs is not worth it in the long run, worsenes the quality of our app and adds a whole lot of bulk to it. We would love to provide support for as many Android versions as possible, but we're a small team working on this app just in our free time, as a hobby.

shymmq commented 7 years ago

Actually it might be possible to lower the API version to 18 and it would require only minor changes. I'll create a new branch this evening.

xeros commented 7 years ago

Cool! API version 18 should be fine for me (and many others, too). Thanks a lot! Going to test it when available.

shymmq commented 7 years ago

Unfortunately even if it compiles there would be many UI issues.

rowysock commented 7 years ago

in e0334827a2d3f817f94cbc094ddda2d7976a3f97 we managed to add basic support for Kit-Kat. Application seems to be working correctly and not crashing, however there are still some things that are not displayed properly (e.g. colour of the header). Unfortunately, just as @Frioo said we are a small team working on that project in our spare time, and we have no capacity to add proper support for older version of Android. @xeros If you feel that that's not enough, I encourage you to try improve UI by yourself. It's an open-source project and all PRs are very welcome.

xeros commented 7 years ago

Thanks a lot! I've just built it (the latest commit af5a60d) & did some testing. My phone refused to install it with API version set to 18 (KK), but it accepts API 18 for other apps. I've changed API version to 17 & rebuilt it again and this time it worked.

Works really good (on Adroid 4.2.2) with one of my children accounts! - 1st class preliminary school, some marks, announcements & filled timetable/lessons plan. It crashes only when I scroll too far, beyond the end of timetable schedule, but besides that everything seems to work fine and I haven't noticed any other glitches with use of that account.

The bigger problem is with my 2nd daughter account - 1st class gymnasium. There's no timetable filled (even in official commercial app or web interface), a lot more marks, etc. for this account. Your app is not able to fetch anything - "Wystąpił nieoczekiwany błąd" (Uknown error occurred) at start - UI is shown, but without any text. Maybe it's related to not existing timetable that it tries to fetch at start?

Anyway, I'm going to use it, at least for my younger daughter account and maybe I'll try to help you with development or at least testing. I'll start with more tests on other devices.

Btw. do you have any plans with multi account & messaging support?

Frioo commented 7 years ago

Right now we are focused on stability and bug fixes, since Librus/Synergia configurations vary between schools we cannot guarantee our app will always work as intended. We do, however, plan to add full messaging support. It's just not worth implementing, yet, because there were numerous complaints on application not logging in properly, as well as crashing. We do our best to make Dziennik the ultimate Synergia client.

Frioo commented 7 years ago

When it comes to the issues you have been experiencing with your daughter's account - it may be her school's fault. Some schools do not provide timetables through Librus/Synergia - it's just one of many available options, such as lucky numbers and grade weights. If it's not available in the web interface, it won't be available anywhere else. I'm not certain whether our app supports disabled timetable.