After completing the listing in 9.20, I tried running the program on a virtual device. The program would not start and displayed the following error in the Console Window:
java.lang.NoSuchMethodError: No static method getDisplay(Landroid/view/View;)Landroid/view/Display; in class Landroid/support/v4/view/ViewCompat; or its super classes (declaration of ‘android.support.v4.view.ViewCompat’ appears in /data/data/com.bignerdranch.android.criminalintent/files/instant-run/dex/slice-com.android.support-support-v4-23.4.0_e3be6ae3110650b0b0cb2c3b490b009be18a4b25-classes.dex)
I looked throughout my code and could not find any getDisplay method. Assuming this is something that Android runs in the background.
I earlier in Chapter 7 had an issue with Android not accepting the support library I imported (v22.214.171.124), which I manually changed to v126.96.36.199. I am not sure if this is the source of the error. I went back and changed the library back to v188.8.131.52, but still could not run the program.
Any help would be greatly appreciated!