I have a few problems regarding using ActionBarSherlock example and mono for android.
Monodevelop does not recognize the ’Com’ namespace. I can compile without errors but the IDE does not recognize the namespaces and classes inside it.
Anybody else suffering from this issues?
Are you referencing the DLL, or the Java Binding project? There is a known bug for this: https://bugzilla.xamarin.com/show_bug.cgi?id=6695. It looks like this bug has been fixed, just not released yet.
If you reference the DLL instead of the binding project you should get your Intellisense back.
Related
I am developing a macOS application in Objective-C and I am using this apple example as a base for my project. When I try to debug the privileged helper, it always says:
com.example.apple-samplecode.EBAS.HelperTool was compiled with optimization - stepping may behave oddly; variables may not be available.
I have checked the existing SA relevant questions but could not find a solution. Any help is greatly appreciated.
EDIT:
It appears that dependencies can cause this kind of behavior. I am using the Qt frameworks in my Xcode Objective-C++ project. This could be the reason of the error. Thanks for your attention.
I've got a web app which loads dlls dynamically from a db. Even though the assemblies are restricted to a few libraries (ex.: Dapper), there's still the problem of dll hell. For instance, if the main site is using dapper 1.50.7 (strong name version) and one of the assemblies is using 1.50.5, then assembly ends up generating an io exception saying that it can't find version 1.50.5.
I've done a couple of searches and haven't found any definitive answer. For instance, this post says that you can still use app.config, but it's still not working.
So, any advice on how to solve this? Is there really no way to solve this kind of issue?
Thanks.
At the end, handling the Resolving event of the default AssemblyLoadContext instance so that it returns the latest loaded assembly was enough for me.
In a new project in IntelliJ I have set up a Java 8 JRE/JDK and language level 8.0.
But for some reason, the IDE cannot find java.util.Optional. The project compiles and works just fine (from within the IDE, too) but code completion does not work.
Any ideas? I'd like to ask a few other users before creating a ticket on their bugtracker...
I finally figured this out. For whatever reason, there was an entry for java.util.Optional in the exlusions under Editor, General, and Auto Import.
Removing that did the trick. No idea how or why it ended up being there. Doesn't sound like anything I would want to do.
Stupid IntelliJ.
I have a SpringBoot project which worked just fine. Then, the next day, when I want to run it, I got this error:
Caused by: java.lang.Error: Unresolved compilation problem:
The type java.util.Optional cannot be resolved. It is indirectly referenced from required .class files without changing anything!
I cleared IntelliJ cache.
Although it was a maven project it was already using JDK8,
I have changed the Project Settings, and said (again) to use JDK8,
Maven re-import, Cleaned the project, Build->Rebuild project, and it magically worked again
I had a similar problem in ubuntu. For me the problem was that I used JDK1.7 and when I changed it to JDK1.8 everything worked just fine.
Now, that makes sense, as Optional is something that was introduced in JDK1.8, before that the concept was exists only in Guava: http://onelineatatime.io/optional-guava-and-java-8/
Ran into the same problem (in IntelliJ 2017.2.7) and solved it like this:
Project Structure->Modules->Module SDK and there change it to 1.8
I've also first set Java compiler to 8 and Project Structure->Project->Project SDK and Project language level also set to 8 without success. In the end, the step I described finally fixed it.
I ran into this recently. The issue was related to my Project SDK setting. Didn't have to clear any caches.
The issue shows with my Project SDK set to 1.8 (1.8.0_202). The issue was fixed by changing it to 11 (11.0.6). Also confirmed that the issue reappears when I switched it back to 1.8.
In java 8 some functions of Optional class not supported such as isEmpty, ifPresentOrElse, or, stream, orElseThrow. You should check whether you use them or not. If you want to use these functions you can use java 11.
I want to use the Novell.Directory.Ldap library in a MonoTouch and Mono For Android project.
http://www.novell.com/coolsolutions/feature/11204.html
When I compile my project in iOS simulator modus, It compiles without errors and runs correctly (in the iOS simulator).
When I compile my project in iOS device modus (to test the app with a physical device), I get this error:
Error MT2002: Failed to resolve "System.Void System.Security.Cryptography.RNGCryptoServiceProvider::.ctor(System.Byte[])" reference from "mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" (MT2002) (MyProject)
How could I solve this problem? I can't find a solution.
Should this library work for MonoTouch and Mono For Android?
Are there better LDAP solutions for Mono?
UPDATE: I just tested it with Mono For Android. This works fine.
There's three questions in there, so I splitted my answers in three. Please read all of them :-)
How could I solve this problem?
This is a general problem with a general solution to solve it.
The code you compiled is including a reference to "mscorlib, Version=1.0.5000.0
That's likely because you did not use the compiler provided with Xamarin.iOS (MonoTouch), named smcs, to build the assembly. That compiler would set the references to use the right mscorlib.dll assembly (and report anything missing in the MOBILE profile).
The fact that it can work for Xamarin.Android is that it uses the JIT (just in time compilation), so missing members won't be found before runtime (and if execution reach that code).
OTOH Xamarin.iOS uses AOT (ahead of time compilation) since JIT'ing is not allowed (by Apple) on devices. That means missing members are found at build time. In this case the (managed) linker can't find the reference and issue the MT2002 error.
So the solution is to re-build the assembly using smcs and fix, if any, build time errors. E.g. IIRC that RNGCryptoServiceProvider ctor is not available (and does nothing since seeding is not possible) and should be replaced with the default ctor.
Should this library work for MonoTouch and Mono For Android?
It should. However my personal experience with Novell.Directory.Ldap was not really good (code and design issues, e.g. threading, in particular with SSL enabled).
Also the code has not been updated for quite a while. You might be better served at looking at (managed or native) alternatives for your LDAP needs.
Are there better LDAP solutions for Mono?
Sadly I have not used any other similar library so I can't suggest alternatives (but maybe other people will be able to help).
The problem is solved.
Instead of using the dll from Novell, I downloaded all the source files of the Novell LDAP library and put them into a new library project. Then I made a reference to that library from my own Mono project.
While compiling my project and the library project, I received some errors from the library project. After solving these errors manually, it works fine for both (MonoTouch and Mono for Android).
New to objective-c. Finally found a tutorial that describes how to create and use a static library in x-code. I'm surprised that building and using libraries is such an arduous process. Is there a more efficient way to create and use static libraries?
I installed JetBrain app-code. But I can't follow the same steps since I can't figure out how to create a workspace in app-code.
Could someone please lists the steps for creating and using a static library in app-code?
Also, how can I change my build path in app-code? I tried to change the path in project properties...there is a text-box but its value keeps reverting back to the default?
I think I'm missing something, because the jet-brain products I've worked with (resharper for C#, and intell-j for Java) are very high quality.
Thanks in advance.
at this moment, AppCode doesn't have full project configuration facilities: you cannot create targets in it. This functionality will be added in the future versions.
Meanwhile, you can use Xcode to setup you project and then switch back to AppCode.
As for the build path reverting to the default, could you please file a bug report in the tracker?