Has anyone been able to successfully integrate Flurry with a BlackBerry mobile application? I have imported the FlurryAgent.jar into my project, yet when I go to run the application I am given the error "Module 'FlurryAgent' not found." I have tried the following:
Preverifying the .jar file
Adding the .jar file to the build path of a library project (that my main project references)
It is still not working for me after trying the above - I'm getting ready to pull my hair out, there really isn't a helpful guide to do this.
Thanks!
In your project properties, go to the Java Build Path section, and then the Order and Export Tab. Make sure the check box for the Flurry component is checked.
That solved it for me.
Flurry was working fine for me in an application I did a year ago. I just added the FlurryAgent.jar file to the build path and then called FlurryAgent.onEvent(String);
I was using NetBeans IDE with Blackberry JDE 4.5
The supplied jar is already preverified, so that should have no effect. Mugur is right that the flurry jar must be included in the build path of the application project and must be included in the built application.
We (Localytics) provide our client libraries in source code to make integration with BlackBerry much, much easier.
We compete with Flurry, but you might want to give it a try: http://wiki.localytics.com
Related
Okay, so I'm having difficulties implementing this Change log library into my android app in eclipse: https://github.com/gabrielemariotti/changeloglib
I tried using the clone url and importing the library into eclipse and then going into the properties of my android project and adding it as a library but that didn't work. I do not have Maven installed nor do I know anything about it. Is there a way I can just get a jar of this library somewhere? Can someone please help me? Thank you!
Its most likely not setup as an Android Library project and that is why it can't be accessed that way.
You can create the jar yourself though by using: https://stackoverflow.com/a/11289115/1784299 eclipse itself or running the jar command in a terminal. (Eclipse might be a little more user friendly if you don't use the terminal.
I would however highly recommend learning how to incorporate Maven in your projects because it is a huge time saver. If you migrate to Android Studio then Maven will become your best friend.
I answer here to help other devs with the same issue.
The library is built with the Android Studio folder structure.
I highly recommend to use the gradle build system to work.
Hovewer, you can build it locally with Eclipse.
All required steps are described here:
https://github.com/gabrielemariotti/changeloglib/blob/master/doc/BUILD.md#reference-this-project-as-a-library-in-eclipse.
It can be valid for a lot of libraries.
Eclipse uses src and res as source folders. Android Studio instead uses src/main/java and src/main/res as source folders.
So you have to mark the java folder as source (right click on folder -> Build-Path -> use as source folder)
guys, with my friend started working on a school project - developing a java app for android. He started it, now it's my turn to do my job, so i got the code he already has, set up Android SDK for Eclipse and downloaded all the neccessary files and packages, but it still gives me errors and I can't even run the project.
One of the errors (the main one, I think) is that it can't import android.support.v7.app.ActionBarActivity
If anyone knows what can I do (I've tried all kinds of solutions from the internet, but none work) I would be very grateful.
Here is a screenshot of the code
http://s17.postimg.org/8aw952lha/Capture.jpg
See if you have imported the ActionBar project to your Eclipse workspace, also, right click on your project->properties->android and check that you have referenced/linked the ActionBar project there.
If you are using a repository without the proper ignore files it is possible that you have imported your partners configurations and then have the references to the auxiliary projects broken (you just need to update that).
Hope it helps.
android.support.v7.app.ActionBarActivity is a support library. This allows older versions of Android (before native support for an action bar was available) to use the action bar.
Since you are having difficulty importing it, I'd assume you do not have the support library installed.
Full instructions are available here:
http://developer.android.com/tools/support-library/setup.html
A snippet for adding support libraries to Eclipse:
Make sure you have downloaded the Android Support Library using the SDK Manager.
Create a libs/ directory in the root of your application project.
Copy the JAR file from your Android SDK installation directory (e.g., /extras/android/support/v4/android-support-v4.jar) into your application's project libs/ directory.
Right click the JAR file and select Build Path > Add to Build Path.
First of all, I realise that similar questions have been posted a lot here. But I've been through all of the answers I can find to similar problems, and nothing has worked yet, so was wondering if someone could help me.
I'm trying to develop a simple chat app with an Android client and a server app sitting running on my laptop. This includes a regular Java "common" project that holds the class that is used to pass messages via the socket.
First I tried to reference the "common" project in the Android project, but after a bit of reading abandoned that idea.
Now I have exported the jar file for the common project, and imported it into my Android project by copying it into the "libs" folder, and then selecting Build Path > Add To Build Path. I have also gone to Properties > Java Build Path > Order and Export and checked the library and moved it to the top of the order.
I have also moved the "gen" project above the "src" one in that build order.
Android Private Libraries is also checked. Everything is checked.
When I debug as an Android Application to my Samsung S3, I see a "Could not find class error" in logcat when advancing to the Activity that contains a reference to a class in the "common" project. Stepping through to the point where a class in the "common" project is referenced then causes a ClassNotFoundException to be thrown.
If I try to put the name of the library in the Android Manifest, like:
<uses-library android:name="com.johndarv.chatproj.common" />
I get:
Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY
Please check logcat output for more details.
Launch canceled!
Upon trying to install.
I have the following versions:
Eclipse Standard SDK 2.0.0
Android SDK 22.3
Android project is compiled with Android 4.2.2.
Any help would be much appreciated! If I can give any more info that would be useful, please ask!
The uses-library tag means that your app expects the library to be available on the system. This is to prevent installation on devices which do not have some expected third-party software installed. Consider phone manufacturer who ships his devices with some specific api.
So this is not your case. Forget about this tag this time.
And as to your problem. The jar is not exported into the apk.
Ensure in Project Settings > Java Build Path > Order and Export that the library jar is checked to be exported.
If you put a jar into /libs dir of android project it is automatically added to the build path. You do not need to do this manually (as you did). Then you can see it (this jar) under Android Libraries entry in under Project Settings > Java Build Path > Libraries. This entry is also checked as exported (by default in android project) in Order and Export tab.
Maybe your problm occurs due to the fact that the jar is actually exported twice (once manually and once as private library). Just remove manually added entry from build path. You will have it added once - but to be honest I do not expect this caused the problem. But for sure the problem is in your project settings. Maybe paste a screenshot with Java Build Path > Order and Export and Java Build Path > Libraries.
I managed to solve this by deleting the common project and then creating a new Java project with "Use execution environment" set to Java SE 1.6. And rewriting (copy-pasting) the old classes.
There must have been something wrong with my previous project, and looks like it was the Java version used to compile. I had tried to set the compliance version to 1.6 on the old project. In any case, creating a whole new 1.6 project, pasting the classes in, re-exporting, and copying into my Android project did the trick.
Thanks to everyone who tried to answer this for your help. Hope someone finds the above useful one day!
I'm writing an Android application and there's some Java code in it that's somewhat sophisticated and therefore hard to verify the correctness of in the Android environment. I would like to run this code in a desktop environment where I have more tools with which to examine the output of this code while still using it in my Android application.
My attempted solution is to have three different projects in Eclipse. My Android project and two plain (non-Android) Java projects. One Java project has the sophisticated code that I want to use in Android and the other is a test program that verifies the correctness of the former project. The latter project has already been useful in debugging the former.
However, so far, my attempts to use the Java project in my Android project appears to work in the IDE but when I actually run the Android application, the NoClassDefFoundError exception is thrown whenever I try to access any of the classes. Obviously, that code is not being recompiled into the .dex file but why not?
I could go into detail about what I've done so far but I can't help but think that what I'm doing is a pretty standard and simple thing and there's a plain way of doing it, even though I can't find anyone doing quite what I'm trying. Can someone describe to me how this is done?
Luckily, I found the answer to my own question and I thought I'd share it here to help others in the same situation. It turned out to be very simple...
What I was already doing would have normally worked, which should have been a big clue to me since I have actually done this before, successfully. All you have to do is, under your Android project's Properties > Java Build Path > Projects, add the plain Java project to your "Required projects on the build path" and then under Properties > Java Build Path > Order and Export, check the checkbox of that same project in the "Build class path order and exported entries" list and everything should just work.
From within Eclipse, there's nothing else you need to do to get this setup to work. It's only when you're compiling from the command line that you need to build Java Jars and import them as libraries but I'm not doing that (yet).
Finally, this wasn't working for me because I just happened to be compiling my plain Java project under JDK 1.7 compliance, while my Android project was compiled under JDK 1.6. This is verified by the output on the Console pane, reporting "Dx bad class file magic (cafebabe) or version." This error message goes away when both projects are compiled under the same compliance level and, not coincidentally, the Android program runs properly.
Thank you to everyone who tried to help and I hope this answer is helpful to someone out there!
Would it not work if you made your other plain java project into an Android project and use it to monitor the output on the device?
hi i am a new android developer. When i am searching for a logic related to my app in google, i found a java application which is related to my android app. After making some changes i succeded in getting output, but i need the code to be in an android based project. When i change to convert it i get lot of errors, is there any possible way to convert the java application into an android app by including any external jar file..... The java application is just a part of my android app, based on that i have to develop more so pls help me....
thanx in Advance
If you intend to include external Java code via .jar files, that is supported in Android. Just put the file into the libs/ directory of your Android project and use the classes as you would somewhere else.
If you are using Eclipse IDE, this might help:
After including the .jar files in the libs/ folder, right click on the required .jar file and select "build path", then click on "add to build path". After doing this, u'll notice that the .jar file is added in the "Referenced libraries" in your project. Once done, you are all good to go and import methods from these files. Hope that helps you remove your errors. Happy coding. :)