I’m making a Android application to scan 2D barcodes.
I’m using the Zxing source code in my application.
When i pasted the code into my project , 29 errors occured .
15 of these errors said the following :”Non-Constant Expressions: Migration Necessary”
The error message box said me to change the switch-statements to if-else statements.
The problem is that i don’t see any switch-statement in my code .
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.test);
findViewById(R.id.get_camera_parameters).setOnClickListener(getCameraParameters);
findViewById(R.id.scan_product).setOnClickListener(scanProduct);
findViewById(R.id.scan_qr_code).setOnClickListener(scanQRCode);
findViewById(R.id.scan_anything).setOnClickListener(scanAnything);
findViewById(R.id.search_book_contents).setOnClickListener(searchBookContents);
findViewById(R.id.encode_url).setOnClickListener(encodeURL);...}
Can Anyone help me with this problem .
Thanks in advance , TB
They changed the way libraries work with the R14 version of the tools. See this. So that’s where the error stems from, but I do not see why it would be reported in the particular snippet of code you posted, maybe there’s something wrong with the library itself.