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

kotlin.TypeCastException: null cannot be cast to non-null type #5

Open
Aym9n opened this issue Nov 4, 2018 · 3 comments
Open

kotlin.TypeCastException: null cannot be cast to non-null type #5

Aym9n opened this issue Nov 4, 2018 · 3 comments

Comments

@Aym9n
Copy link

Aym9n commented Nov 4, 2018

E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.seremtinameno.datamanager, PID: 27109 kotlin.TypeCastException: null cannot be cast to non-null type android.app.usage.NetworkStatsManager at com.example.seremtinameno.datamanager.features.datausage.DataRepository$Data.obtainMonthlyData(DataRepository.kt:36) at com.example.seremtinameno.datamanager.features.datausage.DataRepository$Data.getData(DataRepository.kt:28) at com.example.seremtinameno.datamanager.features.datausage.GetDataUsage.run(GetDataUsage.kt:13) at com.example.seremtinameno.datamanager.features.datausage.GetDataUsage.run(GetDataUsage.kt:8) at com.example.seremtinameno.datamanager.core.interactor.UseCase$invoke$job$1.doResume(UseCase.kt:23) at kotlin.coroutines.experimental.jvm.internal.CoroutineImpl.resume(CoroutineImpl.kt:42) at kotlinx.coroutines.experimental.DispatchedTask$DefaultImpls.run(Dispatched.kt:161) at kotlinx.coroutines.experimental.DispatchedContinuation.run(Dispatched.kt:25) at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1392) at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:257) at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:852) at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1681) at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1636) at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:108)

@theBlackDre1D
Copy link
Owner

Can you write here which phone (model name) you used and version of Android?
How many times did error occur?

@Aym9n
Copy link
Author

Aym9n commented Dec 28, 2018

The error always occur, tested on Lollipop Android studio 3.2.1

@theBlackDre1D
Copy link
Owner

Thank you for respond! This app works only on Android 6 an higher.
This app uses an internal Android database where is information about network usage and this is only in Android 6.0 and higher.

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

No branches or pull requests

2 participants