attribute barrierMargin (aka com.example.myapp:barrierMargin) not found - xamarin.forms

After updating xamarin.forms version to 5.0.2244 facing attribute barrierMargin (aka com.example.myapp:barrierMargin) not found myapp.Android\obj\Debug\100\lp\112\jl
res\layout\material_timepicker_dialog.xml 39 and build failed.

We got the same error after updating Xamarin.Forms from version 5.0.0.1931 to 5.0.0.2337:
material_timepicker_dialog.xml(39): [APT2260] attribute barrierMargin (aka com.example.myapp:barrierMargin) not found.
Xamarin.Android.Aapt2.targets(157, 3): [APT2061] failed linking file resources.
After updating Xamarin.AndroidX.ConstraintLayout from version 1.1.3.2 to 2.1.1.2 we could not reproduce this error.

Related

AndroidX AAPT colors not found

I checked a couple of tutorials and then dove in to Refactor>Migrate to AndroidX. I imported ActivityCompat, ContextCompat and DrawableCompat.
But now I am stuck getting a compile completed because of this error:
AAPT: C:\Program Data\Android\QiewProjects\DBQiew\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v31\values-v31.xml:3: error: resource android:color/system_neutral1_1000 not found.
C:\Program Data\Android\QiewProjects\DBQiew\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v31\values-v31.xml:4: error: resource android:color/system_neutral1_900 not found.
C:\Program Data\Android\QiewProjects\DBQiew\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-v31\values-v31.xml:5: error: resource android:color/system_neutral1_0 not found.
.
.
.
It continues on for about 21 missing items. It appears AndroidX is looking for color files that are missing.
I have spent hours looking for a similar posting, but there aren't any. I have even tried Invalidate caches/Restart but that changed nothing.
Please point me to an explanation to find the missing files or disable the hunt for them. BTW I am using Studio 4.1.2 and compile and target SDK versions 29.
It turned out I had to revise the compile and targetSDK versions from 29 to 31.
It was not mandatory, but I also upgraded the following versions in app/build.gradle:
androidx.appcompat.appcompat:1.0.0 -> 1.4.1
androidx.core.core:1.0.0 -> 1.7.0
androidx.constraintlayout.constraintlayout:1.1.2 -> 2.1.3

UWP app update submission failed with error code 1201

I have a UWP Xamarin Forms app that is in the Microsoft Store. I've updated this app in the partner center several times without trouble. My last update was 1/31/2020.
Yesterday I submitted another update but it failed with the following message:
This submission failed with error code(s) 1201
In searching I've come across threads like this This submission failed with error code(s) 2003,1201 which point to problems with Microsoft.NETCore.UniversalWindowsPlatform, but I've not changed that in this submission. Here's a listing of the nuget packages that I changed with this new submission:
Microsoft AppCenter 2.1.1 to 2.6.4
Xamarin.Forms 4.2.0.848062 to 4.4.0.991640
I've also added Xamarin.Essentials 1.3.1
How can I go about troubleshooting this to figure out what the problem is?
Update:
I've determined it is not AppCenter nor Xamarin.Essentials.
Updating from Xamarin.Forms 4.2.0.848062 to 4.3.x OR 4.4.x causes the problem.
In addition, I noticed something I didn't see before: There is a 'silent' error when packaging for the store with Xamarin.Forms 4.3/4.4. This error is NOT present with Xamarin.Forms 4.2.x. The error is:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\AppxPackage\Microsoft.AppXPackage.Targets(3385,5): error MSB6006: "mspdbcmf.exe" exited with code 1106.
It seems likely that the above error is related to the submission error.
Update 2:
I found the following post on the mspdbcmf error:
https://developercommunity.visualstudio.com/content/problem/855376/mspdbcmfexe-exited-with-code-1106.html
I used the workaround described and I was able to get rid of the silent build error but my app submission still fails with error 1201.

Cause: org.jetbrains.plugins.gradle.tooling.util.ModuleComponentIdentifierImpl

I have connected my Android application with firebase-database by putting this dependency (kapt 'com.google.firebase:firebase-database:16.0.1:15.0.0') but after that I am getting errors like the one mentioned in title also when I synchronized the project I am getting different errors like: Connection time out, Failed to resolved build listener.
Enabling/Disabling offline work and setting proxy in gradle.properties file doesn't work for me.
Also you guys have seen that I used 'kapt' in dependency as it is necessary to use, without it I am getting error "failed to resolve 15.0.0". Removing 15.0.0 doesn't work for me.
Error
Cause:org.jetbrains.plugins.gradle.tooling.util.ModuleComponentIdentifierImpl.getModuleIdentifier()Lorg/gradle/api/artifacts/ModuleIdentifier;ing
I am using Android Studio 3.2 and sadly I can't update this version.
Gradle version: 5.1.1 and
Plugin version: 3.4.0

The realm dot net base example does not compile

I am having trouble at getting the example "QuickJournal" to compile on iOS. The code compiles OK, but fails during the Fody step.
Goals
Try out the example application for .NET through the following
- Pull the repository
- Open the solution in examples/QuickJournal
- Compile and test
Expected Results
Smooth compilation & testing experience
Actual Results
Fody out of memory exception
Steps to Reproduce
See the setup, follow steps
I am using the latest Xamarin/Visual Studio Mac/XCode
Code Sample
The regular realm source code
Version of Realm and Tooling
git clone https://github.com/realm/realm-dotnet.git
git checkout 8f5e36ffd91e06b9c60b91f9de3fb312b411a4a4
The exception I am getting is
Fody: Found debug symbols at '~/realm-dotnet/examples/QuickJournal/QuickJournal/obj/Debug/QuickJournal.pdb'.
MSBUILD : error : Fody: An unhandled exception occurred:
MSBUILD : error : Exception:
MSBUILD : error : Out of memory
MSBUILD : error : StackTrace:
MSBUILD : error : at (wrapper alloc) System.Object:AllocVector (intptr,intptr)
MSBUILD : error : at Microsoft.Cci.Pdb.MsfDirectory..ctor (Microsoft.Cci.Pdb.PdbReader reader,
See log file
RealmCompilelog.txt
Realm 1.2.1 addresses that by using an updated version of Fody.
Answer for older Realm versions:
This is caused by a Cecil bug with Mono 5.0. As Realm depends on Fody, which uses Cecil, compilation will fail for project referencing it. Until new Cecil and Fody versions are released, the workaround is to revert to Mono 4.8:

XCode 4.3 - Build error "missing required architecture armv7"

After upgrade XCode from 4.2 to 4.3 I've got below problem. I can't build it.
Do you guys have idea how can I resolve this problem? even some clue would be helpful to me.
ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Library/Frameworks/SenTestingKit.framework/SenTestingKit, missing required architecture armv7 in file
Undefined symbols for architecture armv7:
"_STComposeString", referenced from:
-[NSMutableURLRequest_ParametersTest verifyDefaultParametersForRequest:] in NSMutableURLRequest+ParametersTest.o
-[NSMutableURLRequest_ParametersTest verifyModifiedParametersForRequest:] in NSMutableURLRequest+ParametersTest.o
-[NSMutableURLRequest_ParametersTest verifyEmptyParametersForRequest:] in NSMutableURLRequest+ParametersTest.o
-[NSString_URLEncodingTest testURLEncodedString] in NSString+URLEncodingTest.o
-[NSURL_BaseTest testURLStringWithoutQuery] in NSURL+BaseTest.o
-[OAHMAC_SHA1SignatureProviderTest testSignClearText] in OAHMAC_SHA1SignatureProviderTest.o
-[OAMutableURLRequestTest testGenerateNonce] in OAMutableURLRequestTest.o
...
"_OBJC_CLASS_$_SenTestCase", referenced from:
_OBJC_CLASS_$_NSMutableURLRequest_ParametersTest in NSMutableURLRequest+ParametersTest.o
_OBJC_CLASS_$_NSString_URLEncodingTest in NSString+URLEncodingTest.o
_OBJC_CLASS_$_NSURL_BaseTest in NSURL+BaseTest.o
_OBJC_CLASS_$_OAHMAC_SHA1SignatureProviderTest in OAHMAC_SHA1SignatureProviderTest.o
_OBJC_CLASS_$_OAMutableURLRequestTest in OAMutableURLRequestTest.o
_OBJC_CLASS_$_OAPlaintextSignatureProviderTest in OAPlaintextSignatureProviderTest.o
_OBJC_CLASS_$_OARequestParameterTest in OARequestParameterTest.o
...
"_OBJC_METACLASS_$_SenTestCase", referenced from:
_OBJC_METACLASS_$_NSMutableURLRequest_ParametersTest in NSMutableURLRequest+ParametersTest.o
_OBJC_METACLASS_$_NSString_URLEncodingTest in NSString+URLEncodingTest.o
_OBJC_METACLASS_$_NSURL_BaseTest in NSURL+BaseTest.o
_OBJC_METACLASS_$_OAHMAC_SHA1SignatureProviderTest in OAHMAC_SHA1SignatureProviderTest.o
_OBJC_METACLASS_$_OAMutableURLRequestTest in OAMutableURLRequestTest.o
_OBJC_METACLASS_$_OAPlaintextSignatureProviderTest in OAPlaintextSignatureProviderTest.o
_OBJC_METACLASS_$_OARequestParameterTest in OARequestParameterTest.o
...
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I was getting the same linking error for the Simulator after upgrading from Xcode 4.2 -> 4.3.1. I noticed that new projects in 4.3.1 do work with Unit Tests, so just compared the project differences.
What fixed it for me was:-
Select Project in project navigator
Select Test Target
Select Build Settings
Go down to Framework Search Paths and single-click it
Delete whatever is there
Enter $(SDKROOT)/Developer/Library/Frameworks $(DEVELOPER_LIBRARY_DIR)/Frameworks
If you had any custom frameworks, add those back
Actually, Unit Tests run fine on the Device, too.
Looks like this was either an accidental (or on purpose) omission on Apple's part.
If (and only if) you are a registered Apple Developer, you can log into the Apple Developer Forums and if you copy this linked search query into your browser address bar, you will see other people have had the same problem.
For now, it looks like you can only use SenTestingKit on the simulator.
I had a similar issue with Xcode 4.4.
My solution path:
Removed SetTestingKit.framework from the main target's (the system under test) "link binary with libraries", leaving it in the test target as is. Not sure why it ended up there in the first place.
I believe this bug is now fixed in Xcode 4.4.1
Using xcode 4.6 and trying to add facebook SDK 3.1 I had this problem because I didn't select to add the files to my test target.
You should check both targets when you copy the framework.
I just upgraded to 4.3.1 There is a problem with SenTestingKit framework. I removed the test source code from the project, it builds ok. And it can run on 5.1 device. But I got _dyld_dyld_start error when I ran it on simulator. I had to remove SenTestingKit from the project to make it work on simulator.

Resources