Realm doesn't load libwrappers.so - xamarin.android

I try to use Realm database(version 0.74.1) in Xamarin.Android project. When I do build all is ok, but when I try to run project i get error
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: Error: Error executing task BuildApk: /{SolutionPath} /packages/Realm.0.74.1/lib/MonoAndroid44/arm64-v8a/libwrappers.so.
what I can do in this situation?

The APK is not built during the default build phase so you only get verification that libraries are in the right place when you run the debugger, or explicitly build an APK.
Can you check if the libwrappers.so file is actually in that location in the packages directory? It should have been put there by NuGet.
Also, is there just one Android target in the solution or have you created a PCL and Android target. The NuGet needs installing into both.

Related

Error: Could not find or load main class org.grails.cli.GrailsCli

I'm trying to start a Grails 4 application in Intellij, the project is configured with Java 8 and Gradle seems to be loaded correctly, but it gives me the following error:
error: Could not find or load main class org.grails.cli.GrailsCli
Is there any know method in which I can get around this problem?
First, check if the language level and SDK are correct (File > Project Structure > (Project/Modules) > Language Level)
From 360learntocode' blog post:
This might be due to the removal of some dependencies or libraries
from the application. Sometimes, while loading multiple applications
from IDE while downloading the library for a particular project other
libraries for another project might remove so this kind of error might
occurs for that project.
Let's first delete the build folder under the application.
Now, let's refresh the Gradle project. Here we are using IntelliJ
Idea, we can refresh the project as below
Image description:
Click Gradle on the right tab;
Select the project;
Click refresh.
After refreshing the project it will download the missing
dependencies. Then run the application which will resolve the problem.
We can also try cleaning the application.
If we are using the command line then type the following command to
clean the application.
grails clean
If we are using the IntelliJ idea then Ctr+Alt+G opens the command
window and use the following command.
clean
Now, re-run the app.

I can not build the generated Android project by Zebble

I am getting the following error when building the android project generated by Zebble for Xamarin.
I followed the steps in -READ-ME-NOW!!!!!!!!!!!! text file. When I did build the android project, this is error I got:
The command "Zebble" update-schema auto" exited with code -1.
Some additional error log I found from Build output:
EXEC : error : Failed to update the xml schema for intellisense: Failed to find the UWP exe file. Searched all EXE files inside: E:\Labs.NET\Xamarin\TestZebble\TestZebbleApp\Run\UWP\bin
Could you please tell me what has gone wrong.
Hope this helps:
Remove all zebble folders from nuget packages folder.
Remove the Run\Android\Zebble.exe file.
Update the zebble nuget to latest version.
Set the Android project as startup project.
From Build > Configuration Manager be sure that Build and Deploy are enabled for android project.
Rebuild the solution.

Using xbuild on iOS application does not generate ipa

We have implemented Continuous Integration with Jenkins to help perform our builds for faster deployment. We have reviewed the documentation provided through the Xamarin website, and have come to an issue. In the walkthrough it describes how to use various plugins to perform the process, we use build scripts to perform our builds because we have some post-actions that we execute after the build, such as submitting the ipa to the TestFlight. The problem is that for iOS it is has been documented that we need to use xbuild instead of mdtool when building from the terminal/command line.
We followed this portion of the guide to construct our xbuild within the build script. It appears that the xbuild command works and creates the project reference dlls and even generates an exe, but does not generate an ipa file even if we set this /p:BuildIpa=true on the xbuild to ensure the ipa generation. We also have provided a location for the ipa to be generated within to ensure we are not missing the file with this /p:IpaPackageDir=$BUILD_PATH. Here is the whole xbuild command that we are currently using, is there something that is incorrect or we are missing?
/Library/Frameworks/Mono.framework/Commands/xbuild $PROJECT_FILE / t:Build /p:BuildIpa=true /p:IpaPackageDir=$BUILD_PATH /p:Configuration=”Release” /p:Platform=”iPhone” /p:OutputPath=$BUILD_PATH
($BUILD_PATH) -- The build path is just “%WORKSPACE%\bin\iPhone\Release\”
I did find this resource as well, which states that xbuild requires the solution file for iOS to build correctly, is that correct?
If this is correct, how do we resolve these errors because I have not been able to find any documentation that explains how to properly define the solution and project files for xbuild deployment, or even how to exclude particular projects during the build:
/Users/developer/.jenkins/workspace/Mobile3_Branch_3.20/ServicePro/iOS/Mobile3.Forms.UWP/Mobile3.Forms.UWP.csproj: warning : Could not find project file /Library/Frameworks/Mono.framework/External/xbuild/Microsoft/WindowsXaml/v14.0/Microsoft.Windows.UI.Xaml.CSharp.targets, to import. Ignoring.
/Users/developer/.jenkins/workspace/Mobile3_Branch_3.20/ServicePro/iOS/Mobile3.ServicePro.UWP/Mobile3.ServicePro.UWP.csproj: warning : Could not find project file /Library/Frameworks/Mono.framework/External/xbuild/Microsoft/WindowsXaml/v14.0/Microsoft.Windows.UI.Xaml.CSharp.targets, to import. Ignoring.
Project "/Users/developer/.jenkins/workspace/Mobile3_Branch_3.20/ServicePro/iOS/Mobile3.sln" (Mobile3.ServicePro.iOS target(s)):
Target ValidateSolutionConfiguration:
/Users/developer/.jenkins/workspace/Mobile3_Branch_3.20/ServicePro/iOS/Mobile3.sln: error : Invalid solution configuration and platform: "“Release”|“iPhone”".
Task "Error" execution -- FAILED
Done building target "ValidateSolutionConfiguration" in project "/Users/developer/.jenkins/workspace/Mobile3_Branch_3.20/ServicePro/iOS/Mobile3.sln".-- FAILED
Done building project "/Users/developer/.jenkins/workspace/Mobile3_Branch_3.20/ServicePro/iOS/Mobile3.sln".-- FAILED
Here is the xbuild command we used to build the solution:
/Library/Frameworks/Mono.framework/Commands/xbuild /p:Configuration=”Release” /p:Platform=”iPhone” /p:OutputPath=$BUILD_PATH /p:BuildIpa=true /p:IpaPackageDir=$BUILD_PATH /t:Build $SOLUTION_FILE
We are not concerned with building the UWP projects when building the iOS project because we have a separate build script that generates the appxbundle file correctly.
You can build an "individual project/app" by setting the SolutionDir and building a .csproj, all the referenced projects will be built and an .ipa created, something like:
xbuild
/p:SolutionDir="./src"
/p:OutputPath="$PWD/artifacts/"
/p:IpaPackageDir="$PWD/artifacts/"
/p:Configuration=Release
/p:Platform=iPhone
/target:Build
src/iOS/XamarinForms.iOS.csproj
Note: This assumes your provisioning profiles are setup on this Mac.

Failed to build Swift framework test

I'm trying to run my test for a custom framework but I get this error:
"xctest[75653:2358339] The bundle “Tests” couldn’t be loaded because it is damaged or missing necessary resources. Try reinstalling the bundle."
I added some dependencies using carthage to the framework. Could this be the issue?
Copy the xcodeprojs from your dependencies inside your workspace
In the buildPhase/link binary with libraries from the test target, add the dependencies clicking + and choosing them from the workspace (you must have your cocoa framework there + the dependencies)
Command B
Command U
Solution: Just set manually your Host Application in the test target

Unable to compile / run run book-examples in eclipse

I am trying to run sample code "MyHierarchicalUI" from section 4.2 from "book of vaadin" and this code refers to TreeExample and TableExample classes which can be found at
http://dev.vaadin.com/svn/doc/book-examples/
I downloaded the book example code from mentioned svn link and imported it as existing eclipse project,however when I try to compile / run this project in eclipse I get the following error.
Errors occurred during the build.
Errors running builder 'Integrated External Tool Builder' on project 'book-examples'.
The file does not exist for the external tool named Copy sources.
The file does not exist for the external tool named Copy sources.
book-examples project is not valid vaadin project so can not be imported directly, we can not build it directly as vaadin project due to missing artifacts like ivy.xml and ivysettings.xml.
To use any code from book-examples project you will have to bring the code to your project manually (copy/paste), however a support ticker to make book-example project import-able / build-able and run-able has been created and can be tracked using this link Ticket # 13078.

Resources