This is related to my own question here:
LocationManager exception
Now that I have no permission issue - same line of code gives me exception:
Caused by: java.lang.IllegalArgumentException: Provider "gps" unknown
at android.os.Parcel.readException(Parcel.java:1251)
at android.os.Parcel.readException(Parcel.java:1235)
at android.location.ILocationManager$Stub$Proxy.setTestProviderEnabled(ILocationManager.java:942)
EDIT:
From what I read - I need to use Eclipse or DDMS. But I use IntelliJ
How do I mock locations using my setup?
It seems that setTestProviderStatus deprecated. Googling and searching didn't help. Some information from book gave me clue that those absolete. Instead, need to mock locations using DDMS when using emulator or device. So, I tried go that route and it seems to be working.
Related
I am getting SecurityException followed by RemoteException while trying to access below code. API
val networkCapabilities =
connectivityManager.getNetworkCapabilities(connectivityManager.activeNetwork)
Exception getting
Fatal Exception: java.lang.SecurityException: Package android does not belong to 10319
at android.os.Parcel.createExceptionOrNull(Parcel.java:2385)
at android.os.Parcel.createException(Parcel.java:2369)
at android.os.Parcel.readException(Parcel.java:2352)
at android.os.Parcel.readException(Parcel.java:2294)
at android.net.IConnectivityManager$Stub$Proxy.getNetworkCapabilities(IConnectivityManager.java:3347)
at android.net.ConnectivityManager.getNetworkCapabilities(ConnectivityManager.java:1549)
Caused by android.os.RemoteException: Remote stack trace:
at android.app.AppOpsManager.checkPackage(AppOpsManager.java:7783)
at com.android.server.ConnectivityService.getNetworkCapabilities(ConnectivityService.java:2297)
at android.net.IConnectivityManager$Stub.onTransact(IConnectivityManager.java:1357)
at android.os.Binder.execTransactInternal(Binder.java:1195)
at android.os.Binder.execTransact(Binder.java:1159)
I have analyzed it and when I dig into the aosp code, I got the flow is going to checkPackage method of from AppOpsManager class shown in attached screenshot and from the code we know whenever check package condition is not equal to MODE_ALLOWED then only we will get Security Excception. But I don't have any. Idea when that condition will fail.
Please help me if anyone has any idea on this , thanks 😊
Looks like it is a known issue
https://issuetracker.google.com/issues/175055271
Dec 10, 2020 11:43AM
We have passed this to the development team and will update this issue with more information as it becomes available.
Sep 14, 2021 12:04AM
Marked as fixed.
The issue has been fixed in Android S and above.
But no fixes for Android below S.
Hi I'm in a bit of bind here.
My app doesn't use webview anywhere, and my most frequent crash in Crashlytics is this error : /data/user/0/[myApp]/cache/WebView is not a directory.
The stack trace is minified despite me not using Proguard to minify/obfuscate so it's probably a lib I'm using.
Caused by java.lang.IllegalArgumentException: /data/user/0/[myApp]/cache/WebView is not a directory.
at bHS.<init>(SourceFile:58)
at akR.a(SourceFile:7)
at aoN.call(SourceFile:7)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at aoR.run(SourceFile:2)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
I'm thinking adMob since it's the only thing that could use a webView or maybe crashlytics itself ?
Has anyone encounter this problem or any lead on how to fix it ?
I tried creating this folder on app startup but it's deleted.
In my case it was that i did not add permissions for internet usage in the manifest:
<uses-permission android:name="android.permission.INTERNET" />
According to this post on the "android-webview-dev" Google Group by a chromium dev:
That looks like a real bug, and it would never show up in our crash reporting because that's crashing in crash handling code.
So it looks like the crash is within Chromium's crash reporting code which... doesn't help you much.
Can you reproduce it at all, or have any users told you how it happened? Additionally, is there any additional information available on Crashlytics (e.g. it only happens on certain Android versions / certain devices)?
I have uploaded the Android app into playstore. While downloading it for the first time it gets crashed but after that it works fine. Its showing the error as Unable to instantiate receiver com.google.android.apps.analytics.AnalyticsReceiver Caused by java.lang.ClassNotFoundException: Didn't find class "com.google.android.apps.analytics.AnalyticsReceiver" .
How to resolve this issue?
I believe that issue related to your manifest file and refer to INSTALL_REFERRER.
Make sure if AnalyticsReceiver class included to your app
My suggestion, if you not use that receiver you can remove it, otherwise will keep throw crash error
Note:
As far as I know com.google.android.apps.analytics.AnalyticsReceiver from Google Analytics SDK v3
While if you using Google Analytics SDK v4 you should use com.google.android.gms.analytics.CampaignTrackingReceiver
Please read this post too
When i use Espresso to test Android UI, I followed by https://google.github.io/android-testing-support-library/docs/espresso/setup/index.html,but it cannot work for me, and when I run the test, caused this error! But the android-testing samples (espresso/BasicSample)work's ok, when i change the applicationId, it doesn't work,
also caused this error.
Follow this documentation setup android UI test with Espresso: https://google.github.io/android-testing-support-library/docs/espresso/setup/index.html
This is my problem, I typed "Runner" to "Ruuner"...enter image description here
I'm not using any provider in my application, however i'm getting the error:
05-20 13:48:08.695 5003-5136/com.example.myapp E/ActivityThread﹕ Failed to find provider info for com.example.myapp
This error doesn't break the app but its strange because it show only my application package without a class, and the problem occurs only in samsung galaxy y duos...
Could it be any other app? A library in project?
This is bothering me
Found the problem, was the MobileAppTracking API in the method trackAction. At least this doesn't break the app, but is a weird message in the log...