JesusFreke / smali

smali/baksmali
6.34k stars 1.07k forks source link

usages of field are not found #711

Closed maiermic closed 4 years ago

maiermic commented 5 years ago

This field declaration has 4 usages (1, 2, 3, 4). None of them is found.

You should be able to reproduce this by

git clone https://github.com/maiermic/panasonic-image-app.git
cd panasonic-image-app
git checkout 0c50c814b448dca7e64de0bdde13318d08f2fb25

Open the Android project in the (sub-) directory panasonic-image-app_1.10.14. Open the file smali/com/panasonic/avc/cng/view/parts/LiveViewLumixZoomView.smali. Move the cursor to the symbol j of the declaration statement of field j (line 40, column 16). Run Edit -> Find -> Find Usages. You should get the result No usages found in All Places.


IntelliJ IDEA 2019.2.1 org.jf.smalidea 0.05

JesusFreke commented 5 years ago

Thanks for the great bug report :). It definitely looks like those usages should be found, I'm not sure why they're not.

JesusFreke commented 4 years ago

This was due to the duplicate java and smali versions of the LiveViewLumixZoomView class. After deleting the java copy, it was able to find the usages in the smali copy.

One possibility to get around this problem might be to define 2 modules in the project, one with the java sources, and another with the smali sources.

maiermic commented 4 years ago

Thanks for looking into this. I will try to define 2 modules.