Xamarin.Forms Can't Archive because the packaging process was failed - xamarin.forms

I clicked the archive button of Xamarin.Forms's Android Project.
Though I did many ways from any other community, github issues, but it failed.
The Settings that I already had :
Set The Linker Only SDK -> None
Set Android project's .csproj AndroidEnableProfiledAot to true
Set the solution configuration to release. (Any CPU)
Anyway it's archiving was failed but some strange warnings like this is disappeared.
But the important and serious problem is now there's failing Archive without error message.
So I can't do anything. Is there any ways to archive my Xamarin.Forms android application?

In my case, this error occurred because of the long name which exceeded the maximum number of characters for the windows path (255 characters).
Renaming my project solved it.

Related

Still getting ITMS-90809: Deprecated API Usage after using --optimize=force-rejected-types-removal

This has been killing me for the last couple of days. I have read everything I can find on this error and have done what xamarin says but it still doesn't work.
I can't get my builds to get through azure pipeline xamarin.ios build and deploy to apple.
When I build locally I get messages like
MTOUCH : warning MT1502: One or more reference(s) to type 'UIKit.UIWebView' already exists inside 'Xamarin.Forms.Platform.iOS, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null' before linking
with a companion message that says no references after linking
when I use --warn-on-type-ref=UIKit.UIWebView with the optimize arg.
When I build on azure in my pipeline, I only see the MT1502 but nothing saying anything after linking. The build gets submitted to Apple and fails because of the ITMS message.
I don't know what to do. I am using the latest macOS vm image, mono 6.8.0.123, xamarin.ios 13.16.0.13, xcode 11.4.1. The pipeline worked fine before April 30 deadline, now no matter what, I can't get the linker to strip UIWebView.
Let me know what other info would be helpful. I am completely stuck at this point.
Thanks.
I just got my build to pass Apple's inspection.
What ended up working for me was building locally and packaging the ipa file. On my mac I then changed the ipa extension to zip and unzipped it. I used terminal to go to the YOURAPPNAME.app "folder" and used grep -r UIWebView . to search for references. Don't forget the . so it searches the current directory. I missed that at first and got some message that grep was listening on stdin.
For me that resulted in a line like this:
Binary file ./Frameworks/PersonalizedAdConsent.framework/PersonalizedAdConsent matches
Now, the important thing to note is the linker never warned about this, so I was completely unaware of it. In my case it was part of Firebase/Admob. I was only one release behind and updating to the latest fixed my problem.
I still am using --optimize=force-rejected-types-removal --warn-on-type-ref=UIKit.UIWebView -warnaserror:1503 as my mtouch args. But builds now get through.
I hope this helps point you guys in the right direction, I've spent the last 3 days just trying to get builds to upload reading every post I could find on the web on this problem.
Solved !! I had to update the way how nugets are included to the iOS project .csproj file. The problem was that linker despite the --optimize=force-rejected-types-removal flag was not removing the UIWebView component form Xamarin.Forms 4.6 probably because it did not see it.
My project was created over two years ago and I was still using the packages.config file. After the update the flag started to work and grep query returned 0 :). The best way is to compare the old .csproj file with freshly created iOS project .csproj file and see how VS is referencing nugets.

VS 2017 IDE0006: Error encountered while loading the project -> No log file in trace mode

In a .Net Web Application solution, I get the warning "IDE0006: Error encountered while loading the project. Some project features, such as full solution analysis for the failed project and projects that depend on it, have been disabled" on project load, which is leading to errors with compilation and intellisense.
I have tried the steps listed here to launch VS with TraceDesignTime, which is supposed to generate a log file, but there is no log file in the expected location. In addition to that, in my search for a solution, I have seen that most people experiencing this warning are developing an Android application or using a Xamarin package, but I am doing neither of those.
Does anybody have any insight as to why the log file would not be generated, or possibly a different way to diagnose what the real problem with loading the particular project might be?

Unable to load DLL sqlite3 in Universal Windows App running on Mobile

I am developing a UWP. I am using the sqlite-net-pcl library. After upgrading my Application from RC to RTM , I got a runtime error - sqlite3.dll could not be found - if it runs on a Mobile emulator or a device. It worked prefectly after I added a reference to C++ 2013 Runtime Package and I ran it in Local Machine.
Exception Message:
Message "The type initializer for 'SQLitePCL.raw' threw an
exception." string
The innerexception message:
{"Unable to load DLL 'sqlite3': The specified module could not be
found. (Exception from HRESULT: 0x8007007E)"} System.Exception
{System.DllNotFoundException}
Of course I could not add a referece to 'Sqlite for Universal App Platform' because I am geting the following error
Severity Code Description Project File Line Error Payload contains
two or more files with the same destination path 'sqlite3.dll'. Source
files: C:\Program Files (x86)\Microsoft
SDKs\UAP\v0.8.0.0\ExtensionSDKs\SQLite.UAP.2015\3.8.11.1\Redist\Debug\ARM\sqlite3.dll
C:\Users\sMavrikis.nuget\packages\SQLitePCL.raw_basic\0.7.1\build\native\sqlite3_dynamic\winrt81\arm\sqlite3.dll TestApp1
Add a reference to 'SQLite for Universal App Platform'
This will trigger the error:
Payload contains two or more files with the same destination path 'sqlite3.dll'.
This error occurs because of different version of sqlite3.dll in both the locations marked by the error.
Resolve this error by simply copying
C:\Program Files (x86)\Microsoft SDKs\UAP\v0.8.0.0\ExtensionSDKs\SQLite.UAP.2015\3.8.11.1\Redist\Debug\ARM\sqlite3.dll
to
C:\Users\%USERNAME%\.nuget\packages\SQLitePCL.raw_basic\0.7.1\build\native\sqlite3_dynamic\winrt81\arm\sqlite3.dll
overwriting existing file.
Rebuild your project. It should compile now.
If you look at the two conflicting locations, one seems to be coming from a more official Microsoft extension for UWP, while the second is coming from a nuGet package.
When I encountered this error, I needed the functionality of the nuGet package, so I decided to keep it and drop the other reference. I right clicked on the project in the solution explorer and went to Add->Reference and then unchecked the reference to SQLite. Seemed less error prone than copying the file from one location to the other to me.
I was getting the same error messages. I had started by using SQLite-PCL which also required SQLite for Universal App Platform as a reference. Later I switched to SQLite.Net-PCL. That is when I got those errors. In researching a solution I found this page. It worked for a bit. Eventually I removed the Reference to SQLite for Universal App Platform and the errors went away.
late reply, but had the issue now; What fix it for me was to do Nuget Package update on all the project in the solution as one of the packages was still using the old reference and was pulling through to the Running project referencing the other project that was out of date.
I fixed a similar issue by selecting x64 or arm in the compiler configuration.
Error Payload contains two or more files with the same destination path 'e_sqlite3.dll'. Source files:
C:\Users\xleon.nuget\packages\SQLitePCLRaw.lib.e_sqlite3.v140\1.1.0\runtimes\win10-arm\native\e_sqlite3.dll
C:\Users\xleon.nuget\packages\sqlitepclraw.lib.e_sqlite3.v140\1.1.0\runtimes\win10-x86\native\e_sqlite3.dll
but this, of course, won´t allow you to run the emulator
Right-Click on the UWP Project and choose Properties.
And make sure the Solution Platform target matches the Project Platform target.
If they are different you will get the build error about copying files to the same destination with the same name (but different target platforms).
I managed to solve the disparity by putting a conditional in the UWP .csproj for including the SQLite dll
<SDKReference Include="SQLite.UWP.2015, Version=3.19.3" Condition="'$(Configuration)'=='Debug'">
<Name>SQLite for Universal Windows Platform</Name>
</SDKReference>
I needed to run with the UWP version for debugging, else my XAMl designer would blow up with "Can't find SQLite.dll..."

error: Failed to parse qmlimportscanner output

I have a created a fresh QML quick application using Qt 5.3.2 on Mac. When I build it has 2 link errors.
Failed to parse qmlimportscanner output.:-1: error:
[iphonesimulator-debug] Error 66
I have not even made any changes to default application, why do I get these errors and how can I fix it?
I know this question is pretty old, however, as I just encountered the same error and finally managed to solve it: Your Project Path must not contain spaces for qml quick projects on ios.
Please do not ask me how or why this is the case (as it clearly works for desktop or android deployment), but this was the issue for me. After moving the project to a different location (a folder that does not contain spaces) it would run qmake and deploy just fine.

Flash Builder: Unable to Export error

I have a a few Flex Builder 3 projects (SDK 3.2/3.5) that I imported into Flash Builder 4. They run fine in debug mode (IE, Firefox, Chrome), with all the swf's and swc's appearing in the bin-debug folder. But, when I try to do an Export Release Build on the main project, I get the following error:
"One or more errors were found while trying to
build the release version. Unable to export."
There is no in errors in the Problems tab, and nothing appears in Console. Just have to hit ok and quit the process.
UPDATE: #doc_80 - I checked the log file, error caused by:
Caused by: java.lang.NoClassDefFoundError: flex2/tools/
oem/OEMException$CircularLibraryDependencyException
Will look into the .project file as suggested by #doc_80
Has anyone else seen this, or know of a fix? I looked a the adobe forum, but their solution to change linked resourses didnt help at all.
Brian
I had the same issue but the reason was desktop.ini file (Windows 7). It appeared in the sme directory with the sound files.
And in the log:
Caused by: java.io.FileNotFoundException: C:.....\assets\ui\sounds\desktop.ini (Access is denied)
... sure this file is hidden. I've delete it manually and everything became OK!
Thanks to the posts here that helped to solve this problem.
Spent all day on this problem, found an answer.
It occurs if your using RSL's in any of your open projects. In my case one of the projects used by the main app was a Library project. Flex 3 SDK is missing files needed for FB4 to handle the RSL dependencies when Export Release build is invoked.
These missing files can be copied from the flex-compiler-oem.jar file in Flex 4 SDK to the same jar in the Flex 3 SDK.
I have put a step by step instructions on my blog:
http://bishoponvsto.wordpress.com/2011/01/19/flash-builder-4-flex-3-sdk-export-release-build-error/

Resources