2

I'm trying to open the Android app, it is crashed immediately after opening the page.

I am using the android P version on(Redmi note 7 pro phone) its crashed only for P version. Its showing ClipboardService error and the error is like the following.

E/ClipboardService: Denying clipboard access to com.google.android.as, application is not in focus neither is a system service for user 0

Please help me to handle this error. Thanks in advance.

jesses.co.tt
  • 2,689
  • 1
  • 30
  • 49
Mohit Lakhanpal
  • 341
  • 1
  • 5
  • 15

1 Answers1

2

Found a solution to this issue.

Here is the detail.

Device : Pixel 2

OS : Android 10

Actual issue that led me to the solution was a closer look in the Logcat where I found a Deprecation of HTTP client, which has already happened in Android Pie. Documentation LINK

Solution as per Doc is to add following line inside the application tag in the manifest.

<application

<uses-library android:name="org.apache.http.legacy" android:required="false"/>
 .
 .
 .
</application>

This fixed the issue for me, not just in one but more than one places, each one displayed a different error in the logcat.

Additional SOF Reference Thanks to @wongk

sud007
  • 5,824
  • 4
  • 56
  • 63
  • This makes the app crash. To me I was being shown the `ClipboardService` issue (same as posted by OP) in highlighted but this was not the reason behind the crash. – sud007 Sep 18 '19 at 12:23
  • Okay. Just confused as to why a networking library with no UI components would be using the Clipboard... – jesses.co.tt Sep 18 '19 at 16:22
  • 1
    @jesses.co.tt Oh, to that I'd say the initiation of crash occurred, when I tapped on a `EditText` Widget on the screen I was repeatedly facing this crash. And this only occurred when I was migrating my office project (It's a well known Shopping App with millions of lines of code), from current `compileSdkVersion = 26` to 28. PS. it may have nothing to do with millions of lines of code BTW. LOL ;) – sud007 Sep 19 '19 at 05:58
  • Millions eh? Ouch. – jesses.co.tt Sep 19 '19 at 18:42
  • @jesses.co.tt he he exactly, that might sound a bit eerie but true. Thanks for the discussion. – sud007 Sep 24 '19 at 09:01