Accessing hidden field and room - android-room

When i add room to my project my logcat has many warnings like:
Accessing hidden field
Landroid/database/sqlite/SQLiteDatabase;->mCloseGuardLocked:Ldalvik/system/CloseGuard;
(greylist-max-o, linking, denied)
Why i get this warnings and how to fix it?

Seems like it was Android Studio issue. After update Android Studio to 4.1.2 i don't see this issue anymore.

Related

Xamarin.Forms iOS app in Release mode Community Toolkit TouchEffect command not firing

I have a Xamarin.Forms application with an Android and iOS version. The Android version is working fine in both Debug and Release mode.. in fact the Android version is already in the Play Store.
However the iOS version has an odd issue. In debug mode it works perfectly, however in Release mode everywhere I use the Xamarin Toolkit TouchEffect in order to attach a Command to an element, does not fire.
<buttons:BackButton xct:TouchEffect.Command="{Binding BackCommand}" xct:TouchEffect.NativeAnimation="True" />
I looked online and apparently this could be a linker issue since maybe the linker is stripping this code from the final build, however I have it set to "Link Framework SDKs only" which seems to be the recommended setting when publishing your app.
Is there something else I may be missing?
Thanks
So after a lot of research indeed the bug is with the linker, which is stripping some Community Toolkit code from the release build, despite the fact that I am using the toolkit in xaml. One thing to note is that I'm only using the toolkit in Xaml.
By simply creating a class in the iOS project file with the below code, the linker sees that I indeed need this package and doesn't strip it's code.
public class LinkerPleaseInclude
{
public void Include(Xamarin.CommunityToolkit.Effects.TouchEffect arg)
{
var dummyCommand = arg.Command;
var dummyCommandParameter = arg.CommandParameter;
var dummyNativeAnimation = arg.NativeAnimation;
}
}
Edit: this may not be enough to solve the issue. If it still persists, try include ‘--linkskip=Xamarin.CommunityToolkit’ inside Additional mtouch arguments of iOS Build screen. That should do it.
If anyone is facing this issue on Android platform we can fix it by adding Xamarin.CommunityToolkit; in "Ignore Assemblies" Entry in "Android Build -> Linker" section.
For some reason when we keep Linker Behaviour as "Don't link" then also not taking these assemblies.

Intellisense and Xamarin.Forms problems

I have a problem on a Xamarin.Forms solution on Visual Studio 2019 (and 2017):
I seem to have lost any Intellisense on the solution. If I try to navigate to an object, i get the message "cannot navigate to the symbol under the caret", even for something declared in the same project. I don't have any colors, nr autocompletion.
I've tried to clean, delete obj and bin folder, rebuild, remove .vs folder, reset user data, reinstall VS.... no change...
BUT, If I remove the package Xamarin.Forms, it fixes it ! The problem is that if I reinstall it and restart VS, it comes back...
For information, the solution build and works without any problem.
That solution didn't have any problem previously, it appeared lately, and I can't figure out what caused it.
The version of Forms used is 2.5.1.444934, but I tried to update without succes.
I don't know what to do anymore...
Edit : I'm adding 2 captures on the same code, one with Forms added as a nuget package, and one without.
The various objects are all declared in the same project, same namespace as AffaireSync.
Without Forms, they are recognised (and DependencyService isn't, but that's normal as it's in Forms).
And With Forms, everything is white, nothing is recognise, nothing is colored, nothing is underlined red...
Without Android Forms
With Android Forms
Ok, I deleted tried a few revert on my solution sources and it didn't fix my problem.
So I deleted my local solutions, checked it out again, and it's all fixed... I can't figured out what happen, but it works, so I'm not touching anything...

Xamarin.iOS 11 Resources are Not Loaded

I recently updated my instance of Visual Studio 2017 to version 15.3.5 and in the process updated Xamarin.iOS to version 11.0.0.0.
Since updating, several of the resources in my project have stopped working. When deploying to a device, the app icon is not displayed (instead blank icon is shown), and Bundle Resources like a custom font file (.tff) is no longer loading. There has been no code changes to the stable branch of our build, but just updating appears to have broken multiple resources.
Has anyone else encountered this? Does the Xamarin team know about this (I'm looking at you Xamarin folks who said to post my questions in SO)?
EDIT:
Here is the guide for updating an app (doesn't appear to apply to the issue I'm seeing): Xamarin Update to iOS11.
Here's a specific example of code that has suddenly stopped working despite no code changes:
UIFont customFont = UIFont.FromName("streamline-24px", (float)this.IconButton.IconSize);
The .tff file is the same, but FromName() yields a null value now.
I figured it out, hopefully this helps anyone with the same configuration that upgrades their Xamarin.Forms or Xamarin.iOS project from Xamarin.iOS release 10 to 11. I was lucky to happen upon it after reading Kevin Mullins answer at Xamarin saying that you should:
Ensure that all of you icon files are in place (either via the info.pst file or an Image asset).
My Info.plist > Visual Assets looked like this (which worked prior to the update)
Selecting Use Asset Catalog and selecting a value resolved the issue.

Rider EAP And Visual Studio For Mac debug

i try to debug my web app. When i add break point in gutter for proper line, i receive an error says : The breakpoint cound not yet be bound to valid location. What should i do to fix it?
Rider debugging has been hosed on Mac for a few months now. Team is hard at work at fixing it - but it requires building out their own debugger or something of the such (yowch!)
See progress blog post here: https://blog.jetbrains.com/dotnet/2017/02/23/rider-eap-18-coreclr-debugging-back-windows/
I had this issue when working on an Android Xamarin project.
Problem was that I was changing the file after starting the debug session.
If I leave the file alone the debug breakpoints work fine.
Here's the issue I created:
https://youtrack.jetbrains.com/issue/RIDER-7118

Visual Studio 2010 is not catching compile errors on build

I have a web project running in Visual Studio 2010 and target .Net framework 4. When I 'Build' the solution it will tell me the build was successful even though there are (known) errors in the code. If I open a page that has an error, the compiler will then pick up on the error and underline it in blue instead of red.
Is there a setting that would drive this kind of behavior? Any ideas on how to fix?
If you have multiple projects in your solution it is possible that one of them is not set to build. In your build output window did you see the name of the web project you are having issues with?
Also, check the build configuration manager to make sure you have it set.
If it's an MVC app, the view files (*.as{p,c}x) will not be compiled unless you explicitly enable it by passing /p:MvcBuildViews=true or enabling that flag in the project file for a given configuration.
I'm having similar (if not identical) problems with compiling an ASP.net 4.0 WebForm. I have a page that is a copy of an existing page in terms of markup, but the code-behind has not been created. As an example, the markup has an ASP:Button with a click event, but the event handler has not been declared in the codebehind yet. When I do a full Build/Rebuild/Clean etc., no errors are found. I open the page, and a compiler error is thrown. As far as I know I haven't made any changes to settings anywhere, just started doing this recently. Additionally, it appears that my break points aren't being caught anymore either. I'm not sure if the two are related, but they did start happening around the same time.

Resources