Using your own *.jars in libgdx 1.9.6 (NoClassDefFoundError) - gradle

Having trouble getting a android compile of a libgdx project to see classes in a .jar file of mine.
From reading around it seems(?) all I should have to do is put them in the /libs directory and ensure the gradle build file has been set to pick them up.
This doesn't seem to be working for me.
See screenshot of mysetup:
Notes;
SSS.jar is file containing my classes
I have configured everything to use Java 1.7 (this needs to be done each gradle refresh, as gradle insists on setting it to 1.8 for some reason)
Android 4.4 for export, the device testing uses 6.0
I have refreshed/cleaned/built more times then I can count ;)
Desktop compile of the project works fine
The error I get when running as android application is as follows;
04-29 19:58:10.462: E/AndroidRuntime(9306): java.lang.NoClassDefFoundError: com.darkflame.client.semantic.SSSIndex$1
04-29 19:58:10.462: E/AndroidRuntime(9306): at com.darkflame.client.semantic.SSSIndex.<clinit>(SSSIndex.java:504)
....(can post more if needed, but I think thats the relevant bit)
(I also tried exporting a .apk and looking inside with 7zip to try to see if the SSS.jar was exported, but to be honest I don't know what I am looking at. How would I tell ?)
Any pointers on how this setup should work would be appreciated.

Related

Run New Relic in Xamarin Android application

I am trying to figure out how to run NewRelic mobile on xamarin forms android application. I found this repository. It is pretty old, but i tried o put latest .jar file and native library builds just fine. After i connect compiled dll to client project, i cant find a way to initialize newrelic, b/c there is no NewRelicHelper class, though it was declared in binidng metadata. Can you help and tell me how to find class that i need and initialize newrelic? Here is repo where you can reproduce issue.
I got it at least a step further, but it is still not working 100%
If you right click the csproj in visual studio and go to properties, in the Application Tab change the Android Class Parser to "class-parse" and the NewRelicHelper will now be in the dll, but the withApplicationToken method is not there.

Xcode Source Compiling Order Issue

I am working on a fork of the Xbox HID project (to allow greater configuration of the controller) and came across a really strange issue.
The project is three projects, which I have grouped together under a workspace, which works well, it compiles them in order (kext, daemon and prefpane) and all works.
However, I decided to uncrustify the code (thanks Alcatraz!) and standardise the names and locations of source files. This required me to update the project as file paths changed.
Once this was all completed the PrefPane wouldn't load. For some reason it was instantiating and sending initWithBundle to an object that was NOT the File's Owner in the XIB.
After a lot of debugging and hair-pulling I discovered the object it was instantiating also happened to be the first file listed in the Compile Sources build phase. Once I moved the correct file to the top of that list the PrefPane once again launched and worked as expected.
That seems wrong, why does it need to compile this particular class first... better yet, why is it picking up only the first compiled class instead of the one specified in the XIB?
I am using Xcode Version 6.2 (6C131e) under OSX 10.9.5, however, I am using the OSX 10.6 SDK and have 10.6 as the deployment target.
I was having some other issues with the project in question, so I rebuilt all three projects and this issue went away.
I am guessing there was some sort of issue with the Xcode project itself as I believe it was probably upgraded from at least two previous major versions of Xcode.
Lesson here seems to be, rebuild the project files themselves and see if that fixes the issues!

JavaFx button not working on Mac

So I have created an application using javaFX in Eclipse. I packaged an executable jar using Maven, with the zenjava javafx-maven-plugin version 2.0. I package in the command line using mvn clean jfx:jar. This creates a javafx/app subfolder in my target, which includes a lib folder and the executable jar.
When I run this executable jar on my Ubuntu or Windows machine, everything seems to work fine. On Mac however, I am having trouble. I have a welcome page that shows up first. It has a small description of the application and a button for users to push to continue on to the application. For some reason the button doesnt do anything on Mac. It works fine on Windows and Ubuntu. Any ideas why this is happening? Do I have to include anything extra for Mac?
There was an issue on Jira (JavaFX Bugtracker) concerning Mouse events on buttons disapearing. It was not exactly your MAC version (in the issue they named 10.8.2) but the issue has been fixed for the JavaFX 8 release (codename lombard). You might want to try the JavaFX 8 beta and see whether your bug has been fixed.
In case you'd like to see the issue: https://javafx-jira.kenai.com/browse/RT-26395

Making Android NDK apps with NativeActivity?

I know that in a normal NDK build, the C++ libraries are built and packed into an apk file. But how can I automate this in Eclipse? I have tried following http://mhandroid.wordpress.com/2011/01/23/using-eclipse-for-android-cc-development/ to run the native-activity sample that came with the NDK, and it ended up not working. Even after I got past most of the reference errors via including, nothing happens when I run it as an Android Application (with a Motorola phone plugged in).
I have looked around quite a bit about this and am still stuck, so I'm open to suggestions at this point. Thanks!
(Please keep in mind that I'm using MinGW/MSys on Windows 7, mostly for running scripts with bash)
I've just decided to go with an Ubuntu VM and use that, and with some tweaking it seems to be working the way it should. I used a combination of http://mhandroid.wordpress.com/2011/01/23/using-eclipse-for-android-cc-development/ and http://developer.android.com/sdk/ndk/overview.html#native-activity to get everything set up. Also a very important note, go to C/C++ General -> Code Analysis -> Launching in your Eclipse project settings and disable both of those options for any native activities you make. I'm not sure if there's a good way to set the libs and includes up for it to work, but currently live bug checking screws things up in the NDK, and I can currently build successfully without it. Plus it'll still mark errors in red after a failed build, so you shouldn't be completely in the middle of nowhere when finding errors.

Problem in plug-in development: Eclipse 3.4 can't find a bundle that is definitively there!

Today I had a problem with my old Eclipse 3.4 installation and I had to re-download the entire package. However, I don't think that I got the exact package as before, and I'm having some problems.
The problem can be summarized as follows: when developing a plug-in, I cannot resolve dependencies towards 'org.eclipse.jdt.ui'. When trying to add the missing plugin, in the dialog the closest match is 'org.eclipse.jdt.ui**.source**'. A similar thing happens with other core plugins.
In order to test, I created a new plug-in using the wizard and I obtained a non-compiling plugin: one of the classes uses the class org.eclipse.jdt.ui.JavaUI and it cannot be resolved. Similarly, the MANIFEST.MF includes a dependency towards 'org.eclipse.jdt.ui', but the 'Bundle 'org.eclipse.jdt.ui' cannot be resolved'.
Now a summary of my platform:
I'm running Mac OS X 10.4 Tiger and Java 1.5.0_19-138
I'm running Eclipse Version: 3.4.1 Build id: M20080911-1700
I downloaded the modeling package, which comes in a file called 'eclipse-modeling-ganymede-SR1-incubation-macosx-carbon.tar.gz'
I've performed a fresh installation, in a new folder and using a new workspace.
If I look at the Plug-in Registry view, I can find the 'org.eclipse.jdt.ui' plugin in there, and it appears to be running. By the way, if it is disabled, then the workbench breaks and stops working.
I cannot understand what is happening. Is my installation broken? I wonder if the Eclipse package that I downloaded has an error and they included the sources instead of the compiled files. But in that case, the plug-in shouldn't be working in the workbench, isn't it?
In any case, why I cannot find the plug-in when I'm adding the dependencies, even if I see it in the Plug-in Registry?
Thanks for your help!
Problem solved: just restart the computer.
I don't restart my computer very frequently, so it took me a lot of time to find out that this was the solution. After I restarted it, everything started to work perfectly again. It seems that either Eclipse leaves something in the memory after running, or that some of my initial failures had left something nasty behind. In any case, I had checked and there were no Eclipse related processes running .... weird, but at least now it's fixed!

Resources