mancj / mancj/MaterialSearchBar

API28 devices logcat “No field mCursorDrawable”

Open
#109 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
2k
Forks
324
PR merge metrics
No merged PRs in 30d

Description

There does not seem to be an exception here, but logcat output the following error

03-09 19:27:29.434 W/System.err( 3142): java.lang.NoSuchFieldException: No field mCursorDrawable in class Landroid/widget/Editor; (declaration of 'android.widget.Editor' appears in /system/framework/framework.jar!classes2.dex)
03-09 19:27:29.436 W/System.err( 3142): at java.lang.Class.getDeclaredField(Native Method)
03-09 19:27:29.436 W/System.err( 3142): at com.mancj.materialsearchbar.MaterialSearchBar.setupCursorColor(MaterialSearchBar.java:322)
03-09 19:27:29.436 W/System.err( 3142): at com.mancj.materialsearchbar.MaterialSearchBar.setupSearchEditText(MaterialSearchBar.java:299)
03-09 19:27:29.436 W/System.err( 3142): at com.mancj.materialsearchbar.MaterialSearchBar.postSetup(MaterialSearchBar.java:264)
03-09 19:27:29.436 W/System.err( 3142): at com.mancj.materialsearchbar.MaterialSearchBar.init(MaterialSearchBar.java:206)
03-09 19:27:29.436 W/System.err( 3142): at com.mancj.materialsearchbar.MaterialSearchBar.(MaterialSearchBar.java:116)
03-09 19:27:29.436 W/System.err( 3142): at java.lang.reflect.Constructor.newInstance0(Native Method)
03-09 19:27:29.436 W/System.err( 3142): at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
03-09 19:27:29.436 W/System.err( 3142): at android.view.LayoutInflater.createView(LayoutInflater.java:647)
03-09 19:27:29.436 W/System.err( 3142): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:790)
03-09 19:27:29.436 W/System.err( 3142): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730)
03-09 19:27:29.436 W/System.err( 3142): at android.view.LayoutInflater.rInflate(LayoutInflater.java:863)
03-09 19:27:29.436 W/System.err( 3142): at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
03-09 19:27:29.436 W/System.err( 3142): at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
03-09 19:27:29.436 W/System.err( 3142): at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
03-09 19:27:29.436 W/System.err( 3142): at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
03-09 19:27:29.436 W/System.err( 3142): at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:440)
03-09 19:27:29.436 W/System.err( 3142): at android.app.Activity.setContentView(Activity.java:2784)
03-09 19:27:29.436 W/System.err( 3142): at com.tumuyan.fetchurl.SearchJsonIndexActivity.onCreate(SearchJsonIndexActivity.java:49)
03-09 19:27:29.436 W/System.err( 3142): at android.app.Activity.performCreate(Activity.java:7149)
03-09 19:27:29.436 W/System.err( 3142): at android.app.Activity.performCreate(Activity.java:7140)
03-09 19:27:29.436 W/System.err( 3142): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1288)
03-09 19:27:29.436 W/System.err( 3142): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3031)
03-09 19:27:29.436 W/System.err( 3142): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3191)
03-09 19:27:29.436 W/System.err( 3142): at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
03-09 19:27:29.436 W/System.err( 3142): at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
03-09 19:27:29.436 W/System.err( 3142): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
03-09 19:27:29.436 W/System.err( 3142): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1920)
03-09 19:27:29.436 W/System.err( 3142): at android.os.Handler.dispatchMessage(Handler.java:106)
03-09 19:27:29.436 W/System.err( 3142): at android.os.Looper.loop(Looper.java:193)
03-09 19:27:29.436 W/System.err( 3142): at android.app.ActivityThread.main(ActivityThread.java:6912)
03-09 19:27:29.436 W/System.err( 3142): at java.lang.reflect.Method.invoke(Native Method)
03-09 19:27:29.436 W/System.err( 3142): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
03-09 19:27:29.436 W/System.err( 3142): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in MaterialSearchBar.java at setupCursorColor (line 322), called from setupSearchEditText and postSetup, and compare the API 28 log with the initialization path. Confirm the search bar still initializes on API 28 without the NoSuchFieldException warning and that cursor setup remains correct.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.