android


Android:non-constant field error


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.

Related Links

Android ble device is not disconnecting sometime
Unit-Test / Integration-Test: Was startService() called
Google-plus login
How to upload image on server using multipart using Retrofit library
In android, how to implement 'Multi-track Audio Support' using Chromecast?
CyberAgent/android-gpuimage: How to implement parallel filter pipeline?
org.json.JSON Exception : End of input at character 0 at
How to programmatically set global typeface for all views in android?
Child RecyclerView's onBindViewHolder doesn't work on my Nested RecyclerView Project in Android
getApplicationContext() on a null object reference
images are not in valid order in RecyclerView (which have a ViewPager in the Row)
How to start two and more equal AsyncTaskLoaders with different args
How to convert a textview to Imageview
CouchBase Lite - update document - Android, why is “properties.putAll(..)” needed?
how to add Facebook latest Android SDK into Eclipse
React Native on Android, ajax call with fetch fails

Categories

HOME
embedded
telegram
android-studio-2.2
jmx
toolbox
devise
pdfbox
permissions
pkcs#11
augeas
pcl-crypto
pybossa
bitnami
fileserver
delphi-xe5
rubymotion
blade
monit
interpreter
comparator
definitelytyped
android-maps
angular-translate
exchangewebservices
eviews
anki
sql-server-2000
quickfixj
erb
biztalk-rule-engine
dynamic-jasper
carriage-return
latitude-longitude
release
chef-solo
setup.py
resolution
plr
congestion-control
smoothstate.js
apollostack
photos
robomongo
netbeans6.8
datamaps
bluez
skin
arules
seq
restore
grails-plugin
redistributable
webjars
tinkerpop3
http-status-code-401
stream-processing
riot
uiactionsheet
user-management
jnlua
gocql
themoviedb-api
jdi
django-urls
xvim
page.js
airbrake
avahi
uvc
java-security
filesplitting
sip-server
ignite-ui
websphere-esb
square-bracket
android-usb
css-reset
pstack
veracity
saleslogix
iboutlet
infobright
box2d-iphone
matlab-load
google-floodlight
photolibrary
undefined-index
ie-compatibility-mode
interprocess
web-application-project
sun
commercial-application

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App