ClassNotFoundException on app startup (on device) - symbian

I have been able to run my app exactly ONCE on the device (N8). Since then I always get a ClassNotFoundException when I launch it. It goes like this:
ClassNotFoundException:
com.greencod.pinball.nokia.PinballMIDLet
at java.lang.Class.forName at
...rtCldc.loadApplicationClass at
...rt.jvm.loadApplicationClass at ...
Invoker.handleStarRequest at
...l.rt.midp.MidleInvoker.run at
java.lang.Thread.run
Note that the app runs fine on the emulator. Also, the first time that it ran was througth the debugger in eclipse. Now the debugger or a plain install doesn't produce an app that can run. I am new to Nokia development, so I must be doing something stupid, I just don't know what :) I am using the Symbian^3 SDK 0.9.
To get the application on the phone, I click 'create package' from the manifest view, which build the jar/jad files for 2 targets: SymbianEmulator and SymbianDevice, which I installed by scanning the SDK folder. After I have tried uploading the file to the device by dropping it in the Install folder, by using the debuger in eclipse and with the Ovi program on my computer. The phone itself is configured to accept unsigned application.
I am quite lost and any help is welcome.
Additional Info
Eclipse is building the jad for me, so I'm not sure that is the problem. Here is the jad file:
MIDlet-1: Pinball Deluxe,,com.greencod.pinball.nokia.PinballMIDLet
MIDlet-Jar-Size: 1882
MIDlet-Jar-URL: Pinball-MIDLet.jar
MIDlet-Name: Pinball Deluxe MIDLet
MIDlet-Vendor: GreenCod
MIDlet-Version: 0.1.0
MicroEdition-Configuration: CLDC-1.1
MicroEdition-Profile: MIDP-2.1
Navi-Key-Hidden: true
Nokia-MIDlet-App-Orientation: portrait
Nokia-MIDlet-On-Screen-Keypad: no
And here is my class declaration:
package com.greencod.pinball.nokia;
import javax.microedition.lcdui.Display;
import javax.microedition.midlet.MIDlet;
public class PinballMIDLet extends MIDlet { ... }

It has been solved: nokia forums. Basically the problem was that the build.properties of the project were messed up.

Related

Network calls not working in EXE distribution build of Compose for Desktop Application

I have used Ktor JVM Client for doing network calls in Compose for Desktop Application.
Network calls are working fine in Debug build means when I am just running the application it's working fine.
But when I create the EXE distribution file, by executing the packageExe task in Gradle, it's creating an EXE file. I have installed it on my machine. Then I am running the application and I am seeing that network calls are not working. I have checked internet is working properly.
Please provide a solution to fix this issue. Thanks in advance.
Your question doesn't leave any details about the failure type (compile error? runtime exception? Empty data? etc.).
But if I had to speculate based on such limited information, I'd guess it's probably this: https://github.com/JetBrains/compose-jb/issues/429
Specifically, when packaging, you need to specify which JVM modules you want to be packed into your distributable app, and likely you are missing your crypto module. Try something like this:
compose.desktop {
application {
mainClass = "MainKt"
nativeDistributions {
modules("jdk.crypto.ec")
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
packageName = "untitled"
}
}
}

Xcode 7 - Cannot open document (storyboard file)

I recently updated to Xcode 7 and as usual something has to go wrong. Its really a shame because I was looking forward to the new features in Xcode 7.
I am faced with a an error which I cannot seem to fix. Every time I try and build the project I get the following error:
I thought there was something wrong with my project, so I made a new Single View application and I still get the same error.
I have tried the following things but none of them has worked for me:
Restart Xcode (Didn't work).
Clean and rebuild project (Didn't work).
Restart Mac (Didn't work).
Reinstall Xcode 7 from the Mac App Store (Didn't work).
Installed Xcode 7 on a different Mac (Still got the same issue, even with a new Xcode project).
I tried the solution in this Stack Overflow question: https://stackoverflow.com/a/31614717/1598906 - But alas it did not work.
Finally, I tried the following Terminal command with no avail: $ sudo killall -9 ibtoold
Is anyone else having this issue with Xcode 7.0? And if so, have you managed to come with any other solutions? I have tried everything I can think of and nothing works.
Lastly, below is a copy of the error Log:
2015-09-18 21:09:28.416 ibtoold[1598:39510] [MT] IBPlatformTool: ***
Failed to launch tool with description
System content
1x for IBCocoaTouchFramework-EightAndLater w/ default fidelity: Failed
to find or create execution context for description
System content
1x for IBCocoaTouchFramework-EightAndLater w/ default fidelity: Failed
to find a suitable device for the type SimDeviceType :
com.apple.dt.Xcode.IBSimDeviceType.iPad-1x with runtime SimRuntime :
9.0 (13A340) - com.apple.CoreSimulator.SimRuntime.iOS-9-0 (Failure reason: Failed to create SimDeviceSet at path
/Users/daniel/Library/Developer/Xcode/UserData/IB Support/Simulator
Devices. You'll want to check the logs in ~/Library/Logs/CoreSimulator
to see why creating the SimDeviceSet failed.) 2015-09-18 21:09:38.290
ibtoold[1598:39510] [MT] IBPlatformTool: Wrote failed marshalling
request diagnostics to path:
/var/folders/lx/kkhv57fd2ll7rhdt0bwfpkb00000gn/T/IB-agent-diagnostics_2015-09-18_21-09-28_418000
/* com.apple.ibtool.errors */ /Users/daniel/Desktop/DS
APPS/BT/BloodyTest/BloodyTest/Base.lproj/LaunchScreen.storyboard:
error: Could not open document
Recovery Suggestion: Failed to connect with the iOS agent. Please file a bug report at bugreport.apple.com and attach a zip file of the
diagnostics located at
"/var/folders/lx/kkhv57fd2ll7rhdt0bwfpkb00000gn/T/IB-agent-diagnostics_2015-09-18_21-09-28_418000".
Underlying Errors:
Description: Failed to find or create execution context for description
System content 1x for IBCocoaTouchFramework-EightAndLater w/ default
fidelity
Underlying Errors:
Description: Failed to find a suitable device for the type SimDeviceType : com.apple.dt.Xcode.IBSimDeviceType.iPad-1x with
runtime SimRuntime : 9.0 (13A340) -
com.apple.CoreSimulator.SimRuntime.iOS-9-0
Failure Reason: Failed to create SimDeviceSet at path /Users/daniel/Library/Developer/Xcode/UserData/IB Support/Simulator
Devices. You'll want to check the logs in ~/Library/Logs/CoreSimulator
to see why creating the SimDeviceSet failed.
Thanks for your time, Dan.
Well thanks to the community for all there help..... not.
In the end I got it working by simply upgrading to OS X El Capitan and Xcode 7.0.1.
One thing I would point out though, is that when I was looking through the Xcode app files, some of them were corrupted and when I updated to Xcode 7.0.1 this issue was not fixed. So before installing OS X El Capitan, I deleted the following:
Xcode 7.0.1 app
Library/Developer folder
Macintosh HD/Library/Developer folder
I then installed OS X El Capitan and then installed Xcode 7.0.1 and now everything works fine.
I hope this helps anyone else who is experiencing the same issue.

Unity3D build error CommandInvokationFailure

When I try to build my project I get the following error
Error building Player: CommandInvokationFailure: Failed to recompile android resource files. See the Console for details.
C:\Program Files (x86)\Java\jdk1.7.0_55\bin\javac.exe -bootclasspath "C:/Users/Ryan/Documents/android sdk only/android-sdk-windows/platforms/android-20\android.jar" -d "C:\Users\Ryan\Documents\Game - Android\Temp\StagingArea\bin\classes" -source 1.6 -target 1.6 -encoding UTF-8 "-S\R.java" "com\RyanVitter\Game\R.java"
stderr[
-S\R.java:8: error: <identifier> expected
package -S;
Does anybody know why this error is being thrown?
My team had an error similar to this, while trying to integrate the facebook SDK.
It worked fine on the computer which was used to import the SDK, but once things were added to git and commited, all other computers could not build to android, and the above error was shown in the console.
This was because unity seems also change some files outside of the project folder once the SDK is imported( We imported it through the asset store).
The solution then was to also import the facebook SDK to all other PCs via the asset store, and then do a "git reset --hard", which seemed to set up the unity editor correctly.
After these steps the project could build again.

Deploy Qt3D project for Android under win 7

I've successfully deployed the cube example APK by creating a new Quick 2 project and copy qml file there, but got "module "Qt3D" plugin "qthreedqmlplugin" not found" error message, any clue for this? I already place the so file into imports/Qt3D folder, but no success. Thanks.
Edit: I tried using Qt 5.1.1 and followed the Qt3D installation described here (http://qt-project.org/wiki/Qt3D-Installation) , and can get rid of the plugin not found error message above. But, this time, a message of “library “libQt53DQuick.so” not found” show up as follows:
W/Qt (29930): assets:/qml/3dCube/main.qml:2 (): assets:/qml/3dCube/main.qml:2:1: plugin cannot be loaded for module "Qt3D": Cannot load library /data/data/org.qtproject.example.test3D/qml/Qt3D/libqthreedqmlplugin.so: (Cannot load library: soinfo_link_image(linker.cpp:1635): could not load library "libQt53DQuick.so" needed by "libqthreedqmlplugin.so"; caused by load_library(linker.cpp:745): library "libQt53DQuick.so" not found)
The problem been solved! After adding the following line in my .pro file:
QT += qml quick 3dquick
The example works well in my sony android phone with adreno gpu, but not in my new lenovo yoga 8" with PowerVR gpu which I'll look into later.
Edit: BTW I eventually use QT5.2.1 for building my example.
That's because in Qt 5.3 there was no way to figure out the plugin dependencies of qml imports. In 5.4, we have the qml import scanner that avoids the need to edit your .pro files to mention qml import dependencies.

Adobe ANE works on iOS and Android devices, but not in AIR simulator

The vibration ane by Adobe works well in a Flex mobile app both on iOS and Android, but when I try to launch an AIR simulator from Flash Builder 4.7 on Windows 7 I get the error:
Here a copy of the error message from the latter screenshot:
Process terminated without establishing connection to debugger.
The content cannot be loaded because there was a problem loading an extension: Error: Requested extension com.adobe.Vibration is not supported for Windows-x86.
Launch command details: "C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64 Bit)\sdks\4.6.0 (AIR 3.5)\bin\adl.exe" -runtime "C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64 Bit)\sdks\4.6.0 (AIR 3.5)\runtimes\air\win" -profile extendedMobileDevice -screensize 640x920:640x960 -XscreenDPI 326 -XversionPlatform IOS -extdir "C:\Users\xxx\Adobe Flash Builder 4.7\.metadata\.plugins\com.adobe.flexbuilder.project.ui\ANEFiles\MyApp-Mobile\win32\" C:\Users\xxx\Documents\MyApp\mobile\bin-debug\MyApp-app.xml C:\Users\xxx\Documents\MyApp\mobile\bin-debug
At the same time:
Another ANE by Adobe - the GameCenter.ane included with Adobe Gaming SDK works flawlessly with the AIR Simulator
The com.adobe.extensions.Vibration.ane mentioned above doesn't fail when I select the BlackBerry AIR simulator (but the iOS and Android AIR Simulators do not work).
Is there a way to make this work more comfortable?
I'd like to use the com.adobe.extensions.Vibration.ane in my Flex mobile app, but I also want to use the AIR simulator - without commenting the source code and removing that ANE from project properties.
UPDATE 2016:
Adobe has updated their Vibration native extension (ANE) sample with 64-bit support.
The problem with the ANE is that it's not a complete implementation. Most importantly the ANE doesn't implement a default fallback implementation which is what the device would fallback to if there wasn't a particular implementation for the current platform.
This makes the ANE very hard to use in cross-platform development as it will fail in some cases. Any platform that isn't specifically included will fail with the message you received.
Basically without changing the ANE yourself you won't be able to use it as you are expecting. Your only way is to do some conditional style compilation and not call the ANE in the simulator.
If you do wish to change the ANE then the best option is to implement the default library. This is quite simple, but you will need: XCode, eclipse with Android dev tools, and adt from the AIR SDK.
Firstly you'll need to compile the existing projects, the Android lib, the iOS lib and the existing actionscript library, to generate VibrationAndroidLibrary.jar, libVibrationiOSLibrary.a and VibrationActionScriptLibrary.swc respectively.
You'll then need to make another actionscript library, and duplicate the com.adobe.nativeExtensions.Vibration class as below:
public class Vibration
{
public function Vibration()
{
}
public static function get isSupported():Boolean
{
return false;
}
public function vibrate(duration:Number):void
{
}
}
This class will replace the other class in cases where the extension isn't implemented instead of you getting the above message.
Then we'll need to add the default definition to the extension.xml file:
<extension xmlns="http://ns.adobe.com/air/extension/2.5">
<id>com.adobe.Vibration</id>
<versionNumber>1</versionNumber>
<platforms>
<platform name="Android-ARM">
<applicationDeployment>
<nativeLibrary>VibrationAndroidLibrary.jar</nativeLibrary>
<initializer>air.extensions.VibrationExtension</initializer>
<finalizer>air.extensions.VibrationExtension</finalizer>
</applicationDeployment>
</platform>
<platform name="iPhone-ARM">
<applicationDeployment>
<nativeLibrary>libVibrationiOSLibrary.a</nativeLibrary>
<initializer>ExtInitializer</initializer>
<finalizer>ExtFinalizer</finalizer>
</applicationDeployment>
</platform>
<platform name="default">
<applicationDeployment />
</platform>
</platforms>
</extension>
Then we'll need to recompile the ANE using the new default actionscript SWC. Lets say you're in the VibrationNEDeliverables directory from the mentioned ANE, you can enter this into a bash file and run it or put it all on one line from the command line). The first couple of lines just extract the library.swf file and move it to the locations needed by the package command. Be careful with the paths etc here, I've assumed you've put the default lib in VibrationActionScriptDefaultLibrary but you'll need to change this appropriately.
unzip -o -d VibrationActionScriptLibrary/bin VibrationActionScriptLibrary/bin/VibrationActionScriptLibrary.swc
unzip -o -d VibrationActionScriptDefaultLibrary/bin VibrationActionScriptDefaultLibrary/bin/VibrationActionScriptDefaultLibrary.swc
cp VibrationActionScriptLibrary/bin/library.swf VibrationiOSLibrary/build/Release-iphoneos/.
cp VibrationActionScriptLibrary/bin/library.swf VibrationAndroidLibrary/bin/.
adt -package \
-storetype pkcs12 -keystore YOUR_SIGNING_KEY.p12 -storepass KEY_PASSWORD \
-target ane com.adobe.extensions.Vibration.ane VibrationActionScriptLibrary/src/extension.xml \
-swc VibrationActionScriptLibrary/bin/VibrationActionScriptLibrary.swc \
-platform iPhone-ARM -C VibrationiOSLibrary/build/Release-iphoneos . \
-platform Android-ARM -C VibrationAndroidLibrary/bin . \
-platform default -C VibrationActionScriptDefaultLibrary/bin .
Once that's complete you should now have a new version of the ANE with a default lib which will make it much more useable! Personally I don't think an ANE should be released without it.
If you need a fully functional ANE, you can check out ours: http://distriqt.com/native-extensions
A solution that I've used in the past was something like this:
Create a utility class that returns whether you're running on a device that supports the ANE. In my case, the class contained a static method that checked the value of Capabilities.os. See the list of values it can return here.
Put the code that calls the ANE method(s) into their own function, and call this function if the ANE is supported. If I recall correctly, it was necessary to put the code that used the ANE in a separate function, not just inside an if block, otherwise the same error would occur in the simulator:
Do this:
public function doSomethingThatWillUseANE():void
{
if (DeviceCapabilities.supportsANE) // static utility class
{
methodThatUsesANE();
}
}
private function methodThatUsesANE()
{
// execute actual ANE method here
}
Instead of doing it all in one function like this:
public function doSomethingThatWillUseANE():void
{
if (DeviceCapabilities.supportsANE) // static utility class
{
// execute actual ANE method here
}
}
same problem exists with the newest vibration ane built for ios 64bit compatibility. My workaround was to place the ane import statement inside the function that actually called the vibrate method, and uncheck the include box for the ane in the project build path settings for android and ios.
I have a flag variable (set by a separate function) in my application that flags whether the app is being run within the ide. The view that uses vibration will only call the above vibration function if the flag is set to non-IDE mode. I still get an initial warning when I run the ide simulator, but not the critical error. When I do a release build, FlashBuilder forces me to checkmark the include box for the ane in the applicable project build path settings (I have to uncheck it again next time I want to run the simulator).
It's clunky, but it makes working with the ane liveable. Peeves me to no end that adobe hasn't addressed this.