Zxing library cannot function correctly - android

I created project with android/ and included core-2.3.0.jar in it's libs/. Set this project as library. Set my project include the library project. But when I finished setting and close the project property and open again, the project library change to a cross icon. Why?
If I ignore this and go to run my project, button clicked, exception: java.lang.NoClassDefFoundError: com.google.zxing.client.android.R$layout

Use this link https://stackoverflow.com/a/19293128/958850
In eclipse select Create a android project from existing source.
browse your zip file for android folder[this is a sample project
bundeled with the library] your project should be imported with few
errors
The actual core library is missing, We should add the ZxingCore
library from process 1
right click project -> properties -> JavaBuildPath(from left pane)
-> project tab -> add -> check ZxingCore - Ok.
All the errors should have gone now. it time to make the barcode
scanner app to be a library project
right click project -> properties -> android(from left pane) ->
check isLibrary -> apply -> OK.
Now you will get errors in some switch case statements. Convert the
problematic switch case statements to it..elseif
Your library project is ready
for those who want to run the barcode scanner as a stand alone app
skip the steps 5,6,7,8

Related

How to add Android-wheel library to android studio?

How to add Android-wheel library(https://github.com/chemalarrea/Android-wheel) to android studio?
Its as simple as other library integration in android studio.
I've listed steps below just follow it you will get android-wheel lib support to your studio project.
1) Download library from github.
2) go to android studio project File -> new -> import module.
- choose android-wheel library.
after above steps library should appear within android studio project explorer.
now you have to add dependency for that follow below steps
1) Right click on your project -> choose Open module settings -> from left
panel choose your project (not android-wheel library)
2) after choosing your project go to dependencies tab in right side frame.
3) press '+' and choose module dependencies and select android-wheel lib.
That's it...
Happy Coding! :)
Please find how to import any module to android studio project from here :
Please follow below steps :
Click on File -> New -> Import New Module.
Add Souce Directory path as library root level path.
Click 'OK' and 'Finish'.
Go to project setting -> Modules -> app -> dependencies -> click in '+' ->
add module ->add wheel module here.
Now build your project and run.And if you found any error let me know.
Please refer below link for reference.!!
https://stackoverflow.com/a/32118213/4018207
Thanks

Zxing 2.2 import as a library project(not .jar) in eclipse

I have downloaded the zxing 2.2 code from the below link
https://code.google.com/p/zxing/downloads/list
My requirement is to import the "core" project into eclipse and add few code into it. then mark it to be library project.
I want to include this library project into barcode scanner sample app and use the barcode scanner app as library from my project.
Solved
prerequisties download latest zxing package.
Process 1
create a java project in eclipse.and name it to something like ZxingCore.
copy and paste complete src folder inside core folder.
In case you need to edit any code, you can do it. otherwise skip this
step.
Java library is ready to be used.
[Note: Compile Java project using Java 1.6 to get rid of run time exceptions]
Process 2
In eclipse select Create a android project from existing source.
browse your zip file for android folder[this is a sample project
bundeled with the library] your project should be imported with few
errors
The actual core library is missing, We should add the ZxingCore
library from process 1
right click project -> properties -> JavaBuildPath(from left pane)
-> project tab -> add -> check ZxingCore - Ok.
All the errors should have gone now. it time to make the barcode
scanner app to be a library project
right click project -> properties -> android(from left pane) ->
check isLibrary -> apply -> OK.
Now you will get errors in some switch case statements. Convert the
problematic switch case statements to it..elseif
Your library project is ready
for those who want to run the barcode scanner as a stand alone app
skip the steps 5,6,7,8

Facebook SDK library disabling

I've added the Facebook SDK for for Android project to my workspace, but when I try to add it as a library to my project it keeps getting disabled. When I add it (by "Properties -> Android -> Library") it gets a green checkmark, but when I press apply/OK and return, it turned into a red cross..
I also added it at "Properties -> Java Build Path -> Libraries" as an external JAR file.

Including library to android project

I have downloaded a library from github, and imported it as android project.
In this library that called Library under preferences -> Android I have set it as a library project as seen bellow:
Now I want to add this library to my Android project that called test. So I Right-Click on it and than preferences -> Android, after that I click add... and choose the library, as seen below:
Than I hit ok and apply and ok again. Nothing happens. After that I click again Right-Click on my project and than preferences -> Android and here is what I see:
What should I do to make it work fine?
The github project link is here.
I downloaded the project from the git and checked it,The .project file for eclipse is missing.
My solution would be create a new project and use these resources

Can't add project as library to my project

I'm trying to use ABS library in my project. I added library project to my workspace, checked this state ("Is Library" is true in project's settins), added this project to my one "Java Build Path" -> "Projects". But I can't mark this project as library ("Android"->"Libraries" in properties). I had added that, but when I opened it again, I saw that project hadn't been added. How can I fix it?
Undo this step:
added this project to my one "Java Build Path" -> "Projects".
You only need to add a library project project under the Android -> Libraries in properties
Check your files to see if they are read-only, especially build.properties.
If you use source control, they will tend to be set to read-only and Eclipse doesn't seem to provide any warnings when it needs to write to these files and can't -- you'll check the box, it looks good, then you exit and reload and it's unchecked!

Categories

Resources