Lumia Imaging SDK throws System.TypeLoadException: Lumia.Imaging.StorageFileImageSource is not registered - windows-runtime

I've used Lumia Imaging SDK (ver 2) for compressing images in my Windows Phone 8.1 RT application. The code for compression randomly throws the following exception:
System.TypeLoadException: Failure has occurred while loading a type.
Requested Windows Runtime type 'Lumia.Imaging.StorageFileImageSource' is not registered.,
Message: Failure has occurred while loading a type.,
Stacktrace: at System.StubHelpers.StubHelpers.GetWinRTFactoryObject(IntPtr pCPCMD)
at Lumia.Imaging.StorageFileImageSource..ctor(IStorageFile storageFile)
How can I fix this?
Update: I'm using Visual Studio 2013 Update 5. Details .

Related

Android Studio 3.2 Beta 1 !zip.isFile Error

I've recently updated Android Studio and my build.gradle version to 3.2.0-beta01.
When I build and run the project !zip.isFile() error occurs with information below:
Caused by: java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: !zip.isFile()
org.gradle.api.tasks.TaskExecutionException: Execution failed for task
':app:transformDexWithInstantRunSlicesApkForDebug'.
The error vanished, after disabling Instant Run.
Android Studio -> Preferences -> Instant Run
Google has indicated that they are going to fix it in Beta-02
https://issuetracker.google.com/issues/110564390

Windows Phone 8.1 throws a FileLoadException on startup

I'm currently building a Windows Phone 8.1 App (WinRT). I can build it in Debug Mode in Visual Studio 2013 without any problems. It is also runs in the emulator and on a real device. But when I build the app in Release mode it crashes instantly on both the emulator and the device.
In the Debug Output windows of Visual Studio I can see that a FileLoadException is thrown on startup. This means:
The exception that is thrown when a managed assembly is found but
cannot be loaded.
https://msdn.microsoft.com/de-de/library/system.io.fileloadexception%28v=vs.110%29.aspx
Unfortunately I can not see which assembly causes the problem! Is there any means to make the information visible?
A first chance exception of type 'System.IO.FileLoadException' occurred in MarketIQ.exe
A first chance exception of type 'System.IO.FileLoadException' occurred in mscorlib.ni.dll
'MarketIQ.exe' (CoreCLR: .): Loaded 'C:\windows\system32\en-US\mscorlib.debug.resources.dll'. Module was built without symbols.
A first chance exception of type 'System.ArgumentException' occurred in mscorlib.ni.dll
A first chance exception of type 'System.ArgumentException' occurred in mscorlib.ni.dll
'MarketIQ.exe' (CoreCLR: .): Loaded 'C:\Data\SharedData\PhoneTools\AppxLayouts\c53a5ef4-9f4f-4a1d-a5f4-2e73b5806daeVS.Release_AnyCPU.oprins\Log.Model.Client.DLL'. Cannot find or open the PDB file.
The program '[3020] MarketIQ.exe' has exited with code -1073741189 (0xc000027b).
The problem was device dependent. The app now runs smoothly after a factory reset.

How to reslove instrumentation error in selendroid?

I have given following coding to start android device.While running,it points the android device and it creates the Android driver App in android device,after that it throws the following error message.
WebDriver driver = new RemoteWebDriver(DesiredCapabilities.android());
driver.get("url");
Error message:
Failed tests: setUp(mobileweb.photocentric.ScrollArticleTest): Could not start the app under test using instrumentation.
INSTRUMENTATION_STATUS: id=ActivityManagerService
INSTRUMENTATION_STATUS: Error=Unable to find instrumentation info for: ComponentInfo{io.selendroid.io.selendroid.androiddriver/io.selendroid.server.ServerInstrumentation}
INSTRUMENTATION_STATUS_CODE: -1
android.util.AndroidException: INSTRUMENTATION_FAILED: io.selendroid.io.selendroid.androiddriver/io.selendroid.server.ServerInstrumentation
at com.android.commands.am.Am.runInstrument(Am.java:865)
at com.android.commands.am.Am.onRun(Am.java:282)
at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)
at com.android.commands.am.Am.main(Am.java:76)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:301)
at dalvik.system.NativeStart.main(Native Method)
I had the same problem and I found out that the androiddriver package was conflicting with a previous version installed in my device.
Try uninstalling the package from your device with the following command:
adb shell pm uninstall io.selendroid.io.selendroid.androiddriver

Monodevelop 2.8.6 on windows

I hope someone can answer this as its driving me crazy. I have installed Monodevelop on windows XP. The version being 2.8.6.5. I set the default/active runtime as Microsoft .Net and set my projects to target .net 4.0 via project settings BUILD-->General->Target framework.
When I debug it from the application output window it loads XSP 2.0 and tries to the old .Net 2 DLL's ie from the .Net 2 GAC - C:\windows\assembly instead of the .Net 4 GAC.
when I debug setting Mono as the active runtime it works ok.
I get the error, which is understandable given the fact the build is targeting .Net 4 yet its looking at the wrong runtime:
Could not load file or assembly 'TestWeb' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.BadImageFormatException: Could not load file or assembly 'TestWeb' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Here is the output from the Output window:
Loaded Module 'C:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll'
Started Thread 1872
Loaded Module 'C:\Program Files\MonoDevelop\bin\xsp2.exe'
Loaded Module 'C:\WINDOWS\assembly\GAC_MSIL\MonoDevelop.Xsp\2.8.0.0__0738eb9f132ed756\MonoDevelop.Xsp.dll'
Loaded Module 'C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll'
Loaded Module 'C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll'
Loaded Module 'C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'
Loaded Module 'C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll'
many thanks
Simon.

MonoDroid:INSTALL_FAILED_OLDER_SDK

Using MonoDroid 4.0.6 and MonoDevelop, any attempt to run in an emulator fails with this error listed below:
The minSdkVersion matches the emulator's SDK version. All AVDs were created by the MonoDroid isntaller.
Detecting package list location
Getting package list from device
Installing shared runtime package on device
1849 KB/s (25866362 bytes in 13.657s)
pkg: /data/local/tmp/Mono.Android.DebugRuntime-debug.apk
Success
Installing the platform framework
1565 KB/s (16530851 bytes in 10.310s)
pkg: /data/local/tmp/Mono.Android.Platform.apk
Failure [INSTALL_FAILED_OLDER_SDK]
Failed to install the platform framework
I solved this in 2 ways.
1) In the manifest the minSdkVersion should match or be lower than the emulator
2) (what tripped me up) The Mono DLLs References of the project should be set to the Android version too.
Both are needed. I come from a Java Android background so never thought to change anything but the manifest.