CallbackContext cannot be resolved to a type; Cordova cannot be resolved or is not a field

1,809 views
Skip to first unread message

docj...@gmail.com

unread,
Sep 20, 2013, 4:19:23 PM9/20/13
to phon...@googlegroups.com
Hello. I'm trying to complete the installation of the phonegap barcodescanner plugin. I followed the directions explicity but when I build it, I get the above two errors along with 16 other similar or identical ones. I downloaded the module from git. The instructions on git are fairly simple so I don't see how I could have misinterpreted and of the few steps. Anyone out there that may know something about this subject? I would appreciate any suggestions. Thanks

svkirans

unread,
Sep 21, 2013, 12:52:26 AM9/21/13
to phon...@googlegroups.com
Are you trying to build for android or iOS ?

docj...@gmail.com

unread,
Sep 21, 2013, 8:08:17 PM9/21/13
to phon...@googlegroups.com
Sorry, I don't usually omit such a basic. It's Android.

svkirans

unread,
Sep 22, 2013, 7:40:00 AM9/22/13
to phon...@googlegroups.com
After creating a project through cordova and importing into eclipse, there is a chance of having some errors based on the Android version configured on your eclipse. But otherwise adding a plugin shouldn't cause issues. The below links have the work around to the commonly faced issues while creating cordova android projects.


docj...@gmail.com

unread,
Sep 22, 2013, 7:32:20 PM9/22/13
to phon...@googlegroups.com
Thanks svkirans. Both of those articles are excellent! The very best I've seen in years. They are clear and concise and technically correct unlike many others like them. The second one even list possible fixes for some errors! I ran through the second one with no problems. However, following the instructions in the first article, I had one command that just wouldn't work on my pc and a couple of build errors. I'm very cautious with Eclipse. It seems to create errors from nothing. I fixed a couple of errors, but then a new unrelated one popped up. I found the same to be true with Titanium Studio which is based on Eclipse. Anyway, thanks again.


On Friday, September 20, 2013 1:19:23 PM UTC-7, docj...@gmail.com wrote:

svkirans

unread,
Sep 23, 2013, 12:22:14 AM9/23/13
to phon...@googlegroups.com
Which command didn't work as expected ? Also what are the errors you are getting now ? Are you configuring the project on eclipse ?

docj...@gmail.com

unread,
Sep 25, 2013, 12:38:46 PM9/25/13
to phon...@googlegroups.com
svkirans. I posted regarding command line problems but I'll reiterate here.
As I think you know, I've had a persistent problem with the error "....android pre-compiler..." in Eclipse with my sample project and sample plugin barcode scanner as described in the tutorial links you sent me.
But the latest thing is command line errors.
After I create a project from the command line and follow it with "cordova -d platform add android", I get the error "no platforms added. Please use cordova platform add android", which doesn't work. Sometime before this , the above command worked but the following one; "cordova build" yielded the same error. So I've taken a giant step backwards.


On Friday, September 20, 2013 1:19:23 PM UTC-7, docj...@gmail.com wrote:
Reply all
Reply to author
Forward
0 new messages