Xamarin Android warnings XA0106, Can not remove such hundreds of warnings - xamarin

My target mono android version is 8.0 and i am building my app at API level 26
while building droid i am getting about 500 warnings related to nuget packages
in Android and IOS is OK....
something like this...
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1476,2): warning XA0106: Skipping BMS.Droid.Resource.Animation.design_fab_in. Please check that your Nuget Package versions are compatible.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1476,2): warning XA0106: Skipping BMS.Droid.Resource.Animation.design_fab_out. Please check that your Nuget Package versions are compatible.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1476,2): warning XA0106: Skipping BMS.Droid.Resource.Attribute.MediaRouteControllerWindowBackground. Please check that your Nuget Package versions are compatible.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1476,2): warning XA0106: Skipping BMS.Droid.Resource.Attribute.mediaRouteBluetoothIconDrawable. Please check that your Nuget Package versions are compatible.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1476,2): warning XA0106: Skipping BMS.Droid.Resource.Attribute.mediaRouteCastDrawable. Please check that your Nuget Package versions are compatible.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1476,2): warning XA0106: Skipping BMS.Droid.Resource.Attribute.mediaRouteChooserPrimaryTextStyle. Please check that your Nuget Package versions are compatible.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1476,2): warning XA0106: Skipping BMS.Droid.Resource.Attribute.mediaRouteChooserSecondaryTextStyle. Please check that your Nuget Package versions are compatible.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1476,2): warning XA0106: Skipping BMS.Droid.Resource.Attribute.mediaRouteCollapseGroupDrawable. Please check that your Nuget Package versions are compatible.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1476,2): warning XA0106: Skipping BMS.Droid.Resource.Attribute.mediaRouteConnectingDrawable. Please check that your Nuget Package versions are compatible.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1476,2): warning XA0106: Skipping BMS.Droid.Resource.Attribute.mediaRouteControllerPrimaryTextStyle. Please check that your Nuget Package versions are compatible.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1476,2): warning XA0106: Skipping BMS.Droid.Resource.Attribute.mediaRouteControllerSecondaryTextStyle. Please check that your Nuget Package versions are compatible.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1476,2): warning XA0106: Skipping BMS.Droid.Resource.Attribute.mediaRouteControllerTitleTextStyle. Please check that your Nuget Package versions are compatible.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1476,2): warning XA0106: Skipping BMS.Droid.Resource.Attribute.mediaRouteExpandGroupDrawable. Please check that your Nuget Package versions are compatible.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1476,2): warning XA0106: Skipping BMS.Droid.Resource.Attribute.mediaRouteOffDrawable. Please check that your Nuget Package versions are compatible.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1476,2): warning XA0106: Skipping BMS.Droid.Resource.Attribute.mediaRouteOnDrawable. Please check that your Nuget Package versions are compatible.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1476,2): warning XA0106: Skipping BMS.Droid.Resource.Boolean.abc_action_bar_embed_tabs_pre_jb. Please check that your Nuget Package versions are compatible.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1476,2): warning XA0106: Skipping BMS.Droid.Resource.Boolean.abc_action_bar_expanded_action_views_exclusive. Please check that your Nuget Package versions are compatible.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1476,2): warning XA0106: Skipping BMS.Droid.Resource.Boolean.abc_config_allowActionMenuItemTextWithIcon. Please check that your Nuget Package versions are compatible.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1476,2): warning XA0106: Skipping BMS.Droid.Resource.Color.design_textinput_error_color_dark. Please check that your Nuget Package versions are compatible.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1476,2): warning XA0106: Skipping BMS.Droid.Resource.Color.design_textinput_error_color_light. Please check that your Nuget Package versions are compatible.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1476,2): warning XA0106: Skipping BMS.Droid.Resource.Color.hint_foreground_material_dark. Please check that your Nuget Package versions are compatible.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1476,2): warning XA0106: Skipping BMS.Droid.Resource.Color.hint_foreground_material_light. Please check that your Nuget Package versions are compatible.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1476,2): warning XA0106: Skipping BMS.Droid.Resource.Dimension.abc_dialog_list_padding_vertical_material. Please check that your Nuget Package versions are compatible.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1476,2): warning XA0106: Skipping BMS.Droid.Resource.Dimension.abc_search_view_text_min_width. Please check that your Nuget Package versions are compatible.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1476,2): warning XA0106: Skipping BMS.Droid.Resource.Dimension.design_bottom_sheet_modal_peek_height. Please check that your Nuget Package versions are compatible.

These non-actionable warnings can be suppressed by editing the following into the Android project file:
<PropertyGroup>
<MSBuildWarningsAsMessages>XA0106</MSBuildWarningsAsMessages>
</PropertyGroup>
As of Visual Studio 16.3 Preview 1, these have been downgraded to messages instead of warnings, so suppression will no longer be necessary. More background is available on the Xamarin.Android GitHub.

Related

In release build getting MTOUCH : error MT5213: Duplicate symbol

Our Xamarin.iOS release build is failing with MTOUCH : error MT5213: Duplicate symbol. This error started happening recently and is likely due to a nuget package somewhere but the funny thing is none of those APIs look familiar at all. I've tried investigating the source but can't find where they're getting included.
I've tried.
1. Downgrading Xamarin forms from latest version to the last point version 2.5xxxx
2. Removing all nuget packages added since our last update in July.
3. Adding --registrar:static
4. Adding -gcc_flags -dead_strip which reduce the errors but still results in this error
___2018-08-24T22:01:20.5791820Z clang : error : linker command failed with exit code 1 (use -v to see invocation) [/Users/vsts/agent/2.136.1/work/1/s/Client/projectName.Client.Forms/iOS/projectName.Forms.iOS.csproj]
2018-08-24T22:01:20.5920220Z error MT5209 : Native linking error : reference to symbol (which has not been assigned an address) _WebPInitYUV444Converters in '_CustomSetup' from /Users/vsts/agent/2.136.1/work/1/s/Client/projectName.Client.Forms/iOS/obj/iPhone/Release/mtouch-cache/WebP.a(libwebpdecode_la-io_dec.o) for architecture armv7 [/Users/vsts/agent/2.136.1/work/1/s/Client/projectName.Client.Forms/iOS/projectName.Forms.iOS.csproj]
2018-08-24T22:01:20.6050340Z MTOUCH : error MT5201: Native linking failed. Please review the build log and the user flags provided to gcc: -dead_strip [/Users/vsts/agent/2.136.1/work/1/s/Client/projectName.Client.Forms/iOS/projectName.Forms.iOS.csproj]
2018-08-24T22:01:20.6130420Z MTOUCH : error MT5202: Native linking failed. Please review the build log. [/Users/vsts/agent/2.136.1/work/1/s/Client/projectName.Client.Forms/iOS/projectName.Forms.iOS.csproj]
2018-08-24T22:01:20.6148240Z
2018-08-24T22:01:20.6180880Z 60 Warning(s)
2018-08-24T22:01:20.6215590Z 4 Error(s)
various --linkskip options to suspect nuget dlls .
How do I get the full error? Can i by pass these ? Here's the a portion of the log file, any help/pointers is greatly appreciated.
2018-08-29T07:57:46.1674730Z duplicate symbol _WebPMultRows in:
2018-08-29T07:57:46.1761750Z /Users/vsts/agent/2.138.6/work/1/s/Client/projectName.Client.Forms/iOS/obj/iPhone/Staging/mtouch-cache/WebP.a(libwebpdspdecode_la-alpha_processing.o)
2018-08-29T07:57:46.1944120Z /Users/vsts/agent/2.138.6/work/1/s/Client/projectName.Client.Forms/iOS/obj/iPhone/Staging/mtouch-cache/liblibwebp.a(alpha_processing.o)
2018-08-29T07:57:46.2117500Z duplicate symbol _WebPMultARGBRows in:
2018-08-29T07:57:46.2265350Z /Users/vsts/agent/2.138.6/work/1/s/Client/projectName.Client.Forms/iOS/obj/iPhone/Staging/mtouch-cache/WebP.a(libwebpdspdecode_la-alpha_processing.o)
Possible reasons for this error:
The same native library is included twice.
Two distinct native libraries happen to define the same symbols.
A native library is not correctly built, and contains the same symbol
more than once. You can confirm this by using the following set of
commands from a terminal (replace i386 with x86_64/armv7/armv7s/arm64
according to which architecture you're building for):
for more information you can access link error-messages
What worked for me was adding the following to mtouch arguments in all configurations, specifically for release|iphone (simulator was working prior)
--registrar:static -gcc_flags "-framework libSkipSharp -dead_strip"
This link was instrumental including a lot trial and error: https://learn.microsoft.com/en-us/xamarin/ios/troubleshooting/mtouch-errors#mt5xxx-gcc-and-toolchain-error-messages

vs2017 compile error: double inclusion of header boost/config/abi_prefix.hpp

I upgraded some vc2008 projects into vc2017 projects, and replaced boost_1_47 with boost_1_64.
Vc2008 projects were correctly compiled, but vc2017 projects reported an error:
fatal error C1189: double inclusion of header boost/config/abi_prefix.hpp is an error
what does it means? And how to solve it?
I used VS2017 with vc141 toolset and windows 10 SDK

Build Faild for TFS

Error:
C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\1.103.2\agent\Worker\Tools\nuget.exe
failed with return code: 1
Packages failed to install Return code: 1
Delivery_Analytics\Delivery_Analytics\Delivery_Analytics.csproj (0, 0)
Cannot resolve Assembly or Windows Metadata file 'System.Runtime.Handles.dll'
C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v14.0\8.2\Microsoft.Windows.UI.Xaml.Common.targets
(264, 5)
Type universe cannot resolve assembly: System.Runtime.Handles, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.
Process 'msbuild.exe' exited with code '1'
2016-08-16T12:16:14.5082366Z System.Security.Cryptography.Cng 4.2.0 is not compatible with UAP,Version=v10.0 (win10-x64-aot).
2016-08-16T12:16:14.5082366Z System.Security.Cryptography.Encoding 4.0.0 is not compatible with UAP,Version=v10.0 (win10-x64-aot).
2016-08-16T12:16:14.5092363Z System.Security.Cryptography.Primitives 4.0.0 is not compatible with
UAP,Version=v10.0 (win10-x64-aot).
2016-08-16T12:16:14.5092363Z System.Collections.NonGeneric 4.0.1 is not compatible with UAP,Version=v10.0 (win10-x64-aot).
2016-08-16T12:16:14.5092363Z System.Collections.Specialized 4.0.1 is not compatible with UAP,Version=v10.0 (win10-x64-aot).
2016-08-16T12:16:14.5102364Z System.Private.Uri 4.0.1 is not compatible with UAP,Version=v10.0 (win10-x64-aot).
2016-08-16T12:16:14.5102364Z System.Net.Requests 4.0.11 provides a compile-time reference assembly for System.Net.Requests on
UAP,Version=v10.0, but there is no run-time assembly compatible with
win10-x64-aot.
2016-08-16T12:16:14.5112357Z System.Runtime.WindowsRuntime.UI.Xaml 4.0.1 provides a compile-time reference assembly for System.Runtime.WindowsRuntime.UI.Xaml on UAP,Version=v10.0, but there
is no run-time assembly compatible with win10-x64-aot.
2016-08-16T12:16:14.5112357Z System.IO.Compression 4.1.1 provides a compile-time reference assembly for System.IO.Compression on
UAP,Version=v10.0, but there is no run-time assembly compatible with
win10-x64-aot.
2016-08-16T12:16:14.5412349Z Generating MSBuild file Delivery_Analytics.nuget. targets.
2016-08-16T12:16:14.5432359Z Generating MSBuild file Delivery_Analytics.nuget. props.
2016-08-16T12:16:14.5712346Z ##[debug]rc:1
2016-08-16T12:16:14.5722353Z ##[debug]success:false
2016-08-16T12:16:14.5812337Z ##[error]Error: C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\1.104.1\
agent\ Worker\ Tools\nuget.exe failed with return code: 1
2016-08-16T12:16:14.5812337Z ##[error]Packages failed to install
2016-08-16T12:16:14.5822348Z ##[debug]task result: Failed
2016-08-16T12:16:14.5822348Z ##[error]Return code: 1
Based on my test, changing Microsoft.NetCore.UniversalWindowsPlatform dependency version to 5.1.0, then it works fine. Based on this thread https://github.com/dotnet/coreclr/issues/3520, the 5.2.0 is prerelease and isn’t yet supported to be consumed by UWP apps.

ld: framework not found MBProgressHUD(Nativescript)

I'm new in using Xcode and I want archive project. It cause this kind of error after I update to Xcode 7.3 and cocopod 1.0.0. And I try downgrade to Xcode 7.1 also same. What setting will cause this error message?
ld: warning: directory not found for option '-F/Users/bae-nb-050/Library/Developer/Xcode/DerivedData/SL-fbodsjqbjvdhcgeemiobyapkoekm/Build/Intermediates/ArchiveIntermediates/SL/BuildProductsPath/Release-iphoneos/MBProgressHUD'
ld: framework not found MBProgressHUD
clang: error: linker command failed with exit code 1 (use -v to see invocation)
If you have upgraded your Xcode or cocoapods to a newer version. I recommend that you do a clean and a rebuild of your project. The same goes for when upgrading natviescript.
tns platform remove ios
tns platform add ios
tns prepare ios

Building/Using CppUnit Library on VS2010

I downloaded and compiled CppUnit to compile with Visual Studio 2010.
After the conversion, I could load the CppUnitLibraries, and it gives me cppunit.lib and cppunit_dll.lib/dll. After copying the headers and libs to a directory, I run this command to get a lot of errors.
I found the conflict of libraries as follows
LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
However, the following command doesn't seem to work.
cl main.cpp complex.cpp testset.cpp /I"C:\CppUnit\include" /link /libpath:"C:\CppUnit\lib" cppunit.lib /NODEFAULTLIB:library
What's wrong with them?
This is the command that I used for compilation/link.
cl main.cpp complex.cpp testset.cpp /I"C:\CppUnit\include" /link /libpath:"C:\CppUnit\lib" cppunit.lib
This is the error message from VS2010.
cppunit.lib(TestResult.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL':
...
node###Z) already defined in LIBCMT.lib(typinfo.obj)
LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:lib
rary
main.exe : fatal error LNK1169: one or more multiply defined symbols found
ADDED
The CppUnit provides older version of project file (dsw), so I needed to convert the file to 2010 solution project manually.
For the error, missing /MD for compilation was the source of the problem. For other compilation warning, I needed to add /EHsc parameter.
cl /EHsc /MD /c /I"./CppUnit/include" main.cpp testset.cpp complex.cpp
link /libpath:"CppUnit/lib" main.obj testset.obj complex.obj cppunit.lib /out:cpptest_static.exe
link /libpath:"CppUnit/lib" main.obj testset.obj complex.obj cppunit_dll.lib /out:cpptest_dynamic.exe
seems like you compiled CppUnit in debug mode, weheras you're now compiling your current files in release mode. Those should not be mixed, and that's what the compiler is telling you.
The quickest way to resolve this would probably be to use a VS project, and check it's settings against the project used to compile CppUnit.
on your edit: you're also mixing runtime libraries (eg check that both are compiled using the /MD switch aka Multi-Threaded DLL)
I upgraded my CPPUNIT projects to visual studio 2010 and had to manually fix it.
The problem in the build was in the final actions where the output files are copied.
For the cppunit_dll project, one of the custom commands is:
copy "$(TargetPath)" ..\..\lib\$(TargetName).dll
copy "$(TargetDir)$(TargetName).lib" ..\..\lib\$(TargetName).lib
$(TargetName) is "cppunit_dll".
This conflicts with what we're actually building: if you look at the Linker options, you see that the output file name is "cppunitd_dll.dll".
The solution I used is to go to ConfigurationPropertys\General, and change "Target Name" from $(ProjectName) to"cppunitd_dll".
I had to to a similar solution for the cppunit project.
read INSTALL-VS.Net2008.txt in the cppunit folder after checking out the source code from SVN.
basically:
there is a visual studio solution under the examples folder.
that being said... i still can't get it to build without errors on vs2010 after converting it. i get 'cmd.exe' failed and failures to copy dlls.

Resources