Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crash on android below 5 #52

Closed
amir1376irani opened this issue Jun 6, 2021 · 1 comment
Closed

crash on android below 5 #52

amir1376irani opened this issue Jun 6, 2021 · 1 comment
Labels

Comments

@amir1376irani
Copy link

Hi
Tnx for this great app :)
I have tested your app on lenovo A3300HV (stock android 4.4.2)
it works fine in this tabs : CPU - GPU - RAM - STORAGE - SCREEN
and this tabs are faulty : ANDROID - HARDWARE - SENSORS


After opening each faulty tab, it shows exactly same error :
error


To reproduce this: run it on this android version if you have any device or just make an emulator with this version of android (api level 16 to 20) it must appear!


So i checked output of logcat for ANDROID, HARDWARE and SENSORS tabs and saw something meaningful which were same (don't hestitate about that pid thing {6032}, thats a random number as process identifier for the OS and will be changed on every run):

 W  [ 6032] dalvikvm threadid=1: calling UncaughtExceptionHandler
 E  [ 6032] AndroidRuntime FATAL EXCEPTION: main
 E  [ 6032] AndroidRuntime Process: com.kgurgul.cpuinfo, PID: 6032
 E  [ 6032] AndroidRuntime java.lang.NoSuchMethodError: android.net.wifi.WifiManager.is5GHzBandSupported
 E  [ 6032] AndroidRuntime 	at com.kgurgul.cpuinfo.features.information.hardware.HardwareInfoViewModel.o(SourceFile:24)
 E  [ 6032] AndroidRuntime 	at com.kgurgul.cpuinfo.features.information.hardware.HardwareInfoViewModel.r(SourceFile:10)
 E  [ 6032] AndroidRuntime 	at com.kgurgul.cpuinfo.features.information.hardware.HardwareInfoViewModel.<init>(SourceFile:4)
 E  [ 6032] AndroidRuntime 	at com.kgurgul.cpuinfo.features.information.hardware.d.b(SourceFile:4)
 E  [ 6032] AndroidRuntime 	at com.kgurgul.cpuinfo.features.information.hardware.d.a(SourceFile:1)
 E  [ 6032] AndroidRuntime 	at f.l.a.a.d(SourceFile:4)
 E  [ 6032] AndroidRuntime 	at androidx.lifecycle.a.c(SourceFile:2)
 E  [ 6032] AndroidRuntime 	at androidx.lifecycle.o0.b(SourceFile:6)
 E  [ 6032] AndroidRuntime 	at androidx.lifecycle.o0.a(SourceFile:2)
 E  [ 6032] AndroidRuntime 	at androidx.lifecycle.n0.a(SourceFile:4)
 E  [ 6032] AndroidRuntime 	at androidx.lifecycle.n0.getValue(SourceFile:1)
 E  [ 6032] AndroidRuntime 	at com.kgurgul.cpuinfo.features.information.hardware.b.X1(SourceFile)
 E  [ 6032] AndroidRuntime 	at com.kgurgul.cpuinfo.features.information.hardware.b.R1(SourceFile:1)
 E  [ 6032] AndroidRuntime 	at com.kgurgul.cpuinfo.features.information.base.b.w0(SourceFile:5)
 E  [ 6032] AndroidRuntime 	at androidx.fragment.app.Fragment.Z0(SourceFile:4)
 E  [ 6032] AndroidRuntime 	at androidx.fragment.app.r.e(SourceFile:13)
 E  [ 6032] AndroidRuntime 	at androidx.fragment.app.m.C0(SourceFile:25)
 E  [ 6032] AndroidRuntime 	at androidx.fragment.app.m.B0(SourceFile:1)
 E  [ 6032] AndroidRuntime 	at androidx.fragment.app.m.z0(SourceFile:4)
 E  [ 6032] AndroidRuntime 	at androidx.fragment.app.a.z(SourceFile:26)
 E  [ 6032] AndroidRuntime 	at androidx.fragment.app.m.S(SourceFile:6)
 E  [ 6032] AndroidRuntime 	at androidx.fragment.app.m.T(SourceFile:14)
 E  [ 6032] AndroidRuntime 	at androidx.fragment.app.m.O0(SourceFile:10)
 E  [ 6032] AndroidRuntime 	at androidx.fragment.app.m.R(SourceFile:5)
 E  [ 6032] AndroidRuntime 	at androidx.fragment.app.a.l(SourceFile:2)
 E  [ 6032] AndroidRuntime 	at androidx.fragment.app.s.b(SourceFile:4)
 E  [ 6032] AndroidRuntime 	at androidx.viewpager.widget.ViewPager.F(SourceFile:50)
 E  [ 6032] AndroidRuntime 	at androidx.viewpager.widget.ViewPager.P(SourceFile:15)
 E  [ 6032] AndroidRuntime 	at androidx.viewpager.widget.ViewPager.O(SourceFile:1)
 E  [ 6032] AndroidRuntime 	at androidx.viewpager.widget.ViewPager.setCurrentItem(SourceFile:2)
 E  [ 6032] AndroidRuntime 	at com.google.android.material.tabs.TabLayout$i.b(SourceFile:1)
 E  [ 6032] AndroidRuntime 	at com.google.android.material.tabs.TabLayout.s(SourceFile:2)
 E  [ 6032] AndroidRuntime 	at com.google.android.material.tabs.TabLayout.D(SourceFile:11)
 E  [ 6032] AndroidRuntime 	at com.google.android.material.tabs.TabLayout.C(SourceFile:1)
 E  [ 6032] AndroidRuntime 	at com.google.android.material.tabs.TabLayout$Tab.select(SourceFile:2)
 E  [ 6032] AndroidRuntime 	at com.google.android.material.tabs.TabLayout$h.performClick(SourceFile:4)
 E  [ 6032] AndroidRuntime 	at android.view.View$PerformClick.run(View.java:18770)
 E  [ 6032] AndroidRuntime 	at android.os.Handler.handleCallback(Handler.java:808)
 E  [ 6032] AndroidRuntime 	at android.os.Handler.dispatchMessage(Handler.java:103)
 E  [ 6032] AndroidRuntime 	at android.os.Looper.loop(Looper.java:193)
 E  [ 6032] AndroidRuntime 	at android.app.ActivityThread.main(ActivityThread.java:5292)
 E  [ 6032] AndroidRuntime 	at java.lang.reflect.Method.invokeNative(Native Method)
 E  [ 6032] AndroidRuntime 	at java.lang.reflect.Method.invoke(Method.java:515)
 E  [ 6032] AndroidRuntime 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:824)
 E  [ 6032] AndroidRuntime 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:640)
 E  [ 6032] AndroidRuntime 	at dalvik.system.NativeStart.main(Native Method)

I checked your app manifest it says minSDK is 16
You have defined this in line 6 of build.gradle

So for supporting this versions (api 16 to 20) you need to add some checks of version for every method, which maybe not supported or not available and just skip those tests if not possible to messure!

kamgurgul added a commit that referenced this issue Jul 19, 2021
@kamgurgul kamgurgul added the bug label Jul 19, 2021
kamgurgul added a commit that referenced this issue Jul 19, 2021
* Fix tile service injection

* Base migration to SDK 29

* Fix apps listing for Android R

* Gpu data refactor

* Gpu data refactor cleanup

* Ram info refactor, kotlin upgrade

* Adjust name convention

* Update kotlin, switch interactors to SharedFlow

* Libs update

* Libs update v2, remove CSV, fix TabLayout glitch (temporary material downgrade to 1.2.0)

* Simplify ViewModels

* Update libs

* Enable edge to edge

* Fix for NoSuchMethodError (#52)

* Fix Google search

* Add Google services Framework ID (#51)

* Version bump
@kamgurgul
Copy link
Owner

Fixed in 4.5.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants