Twitter4J on netbeans proyect not able to import jar file - twitter

I am learning to use twitter4J library, i was trying to add the jar (twitter4J-core-4.0.7-javadoc) file in my netbeans proyect, i already added it to the library in my proyect but within my source code, the imports are throwing a "package twitter4J doesnt exists" error, but i already added the jar file to my proyect, what am i doing wrong or what am i missing?
i added the twitter4J.properties to my src folder
also, i was wondering why are almost all the files within the jar file .html?

i already found the answer to my problem, the thing was, i was importing the twitter4J-core-4.0.7-javadoc.jar file within library but i didnt need this file but the twitter4J-core-4.0.7.jar found in the lib folder.

Related

Xcode subproject cannot find its own header files

I have an sdk that is added to my project as a subproject in xcode. My main project's classes can import all the header files successfully into the code by using
#import "Filename.h"
because I added the sdk directory to my Header Search paths in the build settings of my main project.
However, the problem is that the classes of my sdk can't successfully import each other unless they are in the same directory. In my case, this is a problem because my sdk has folders within it with header files that the files in the main sdk folder want to import. As a result, I receive the error:
'Filename.h' cannot be found
when files in the main sdk folder try to import header files nested in deeper folders in the sdk. When I tried to move all the files into the main directory (I'm fine with sacrificing organization for functionality), the original error remained and I got two more errors:
clang: error: no such file or directory: '/Users/.../MainProjectFolder/SDKFolder/NestedFolder/Filename.m'
clang: error: no input files
It seems to know where to look for the files but the other files still can't access it.
Does anyone have any ideas to help?
Thanks, any help is appreciated!

Extract jar from aar for cordova plugin, Class not found error at runtime

I have an "aar" file that was generated using gradle with
apply plugin: 'com.android.library'
Now I want to use this aar library to create a cordova plugin. I unzip the aar file, get a "classes.jar" and put the jar into cordova's "libs" directory. My cordova project compiles without any problem, I can import and use classes in the jar file. But it crushed at run time with the following error
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/example/pkg/R$raw;
Package "com.example.pkg" is in my "classes.jar", but there is no class call "R$raw". What did I miss?
AAR files bundle not only source but also the libraries self contained Android resources. Take a look at the contents of an AAR bundle.
It appears the original AAR file you had contained some raw resources which are not included in the jar. You cannot package Android resources in a .jar file so your application is crashing when it needs to access the ID's generated for resources.
You can check this by opening up the original AAR file (it is simply a zip archive). Take a look under the res folder for any resources that are needed by the library.
Yes, extracting classes.jar is not going to work and it will throw runtimeexceptions...
What i did to solve the problem is:
After cordova project creation, adding platform, adding plugin is done.
Lets say the aar file are copied in libs folder. ( assume file name is cards.aar )
then in app build.gradle specify following and click sync project with Gradle files.
repositories { flatDir { dirs 'libs' } }
dependencies { compile(name:'cards', ext:'aar') }
It works for me!! but one drawback of this solution is .. you need to open the project from platform folder on Android Studio and add the above lines to your build.gradle

Facebook iOS SDK 3.1 from Github missing FacebookSDK.framework

I want to use Facebook SDK on XCode 4.5 for integration with iOS6.
I read this tutorial. I was using this .dmg package to install the library but I need to track and read the implementation of some methods, so I noticed that there is a repo on Github with the current source code.
My problem is that I don't know how to install this properly as with the package .dmg. Any ideas on how to do it? I tried to just import the src folder and reference the whole project but I'm having a lot of issues, warnings and errors.
Update
I had to do this again, so now I made it work. Here is what I did:
I tried both ways, building the source code (1) and importing the files directly(2). On the first scenario it was easy, on the root folder of Github repo just run:
sudo scripts/build_framework.sh
You will get the files needed, the same that you get when installing with .pkg. But I needed to track the functions, so I tried to importing the files.
First I added the src folders from the Github repo on my project. I had an issue with duplicated definitions on every file. The problem was on my Build Settings (BS), I was still referencing to the .pkg install directory of Facebook so I had the files duplicated. I removed every reference to that folder on BS and then added the files.
After that, on the files that imported the Facebook files I got:
Undefined symbols for architecture i386
When I copied the files to XCode, the .m files where not automatically added to the Build Phases / Compile Sources. I added them manually and imported FBConnect.h on my files.
Hope it helps some one with the same issue.
If you include the FacebookSDK via git, you will need to build the framework. Run the following command from within the FacebookSDK directory:
scripts/build_framework.sh
Then, FacebookSDK.framework will appear in FacebookSDK/build
Add the entire src folder to your project. Import FBConnect.h in any class where you want to use Facebook. The connect class imports the rest of the necessary classes.
#import "FBConnect.h"

Where are the opencv2 include files?

I'm struggling to find the include files that should be in a directory names "opencv2"! I've downloaded OpenCV-2.4.0.tar.bz2 from here and extracted the files and ran cmake, which seemed to build the library successfully.
The problem is that under the "include" directory for "opencv2" there seem to be tons of header files missing. The only header file there at the moment is "opencv.hpp", which includes a whole set of other files which aren't there. Does anyone have any idea where I can get these files from?
Thanks!
The header files of the modules are in their own directories. E.g., you can find calib3d.hpp in /modules/calib3d/include/opencv2/calib3d. The Makefile created by CMake knows these addresses, hence when you make install the header files are all copied into /usr/local/include/opencv2.
In case you were using cmake-gui and visual studio on Windows to make opencv (I had 3.4.0), don't forget to build this project:
This will generate all required files in a single folder, so you can easily connect header files:

Unable To Find Imported Jar File For Json ME In Blackberry JDE

I imported the Json ME jar file
downloaded from "github"
into a blackberry project in which i will need to interpret
JSON responses from a web service.
The issue is that the project fails to compile
when it encounters this line:
import org.json.JSONObject;
And gives the error
error: package org.json does not exist.
The name of the jar file is "json-1.0.jar"
How can i resolve this?.
As you have imported additional jar file, then you should get additional cod file when compilation finished. Seems that you have installed only application cod file without library cod file.
Look at the folder where your application cod file located. There must be additional cod file, related to org.json library. Sign this library and install it along with the application cod file.
If there is no library cod file exists in the compiled app folder, check your project settings. Seems that jar file has been added incorrectly or it is not accesible.
Create folder called lib within your resource folder, copy and put the jar file in lib folder right click the jar Select Build Path-> Add to build path, then import the jar if you want to use in ur project It wont through module not found exception.

Resources