question

CesarRangel-4591 avatar image
0 Votes"
CesarRangel-4591 asked CesarRangel-4591 answered

Weird behavior if I try to deploy my project on my phone, but it complies correctly

Long story short ...

I've been working on a Xamarin Forms app since December 2019, an i've been updating my Xamaring Forms so I can keep it up running with the latest features so far so good until Xamarin 5 came in. This version asks me to change my compileskdversion from 9 or lower to at least 10, so I did.

My app runs smoothly with android 9.0 (Pie) and Xamarin Forms 4.8.0.1821 (latest before 5.0.0.1874 official realese version) The moment I change my SDK and try to run it on my physical phone it throws me this 2 errors:

Gravedad Código Descripción Proyecto Archivo Línea Estado suprimido Error XARDF7023: System.IO.DirectoryNotFoundException: No se puede encontrar una parte de la ruta de acceso 'AccessibilityManagerCompat_AccessibilityStateChangeListenerImplementor.class'. en System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive, Boolean throwOnTopLevelDirectoryNotFound, WIN32_FIND_DATA& data) en System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive, Boolean checkHost) en Xamarin.Android.Tasks.RemoveDirFixed.RunTask()

Gravedad Código Descripción Proyecto Archivo Línea Estado suprimido Error XARDF7024: System.IO.IOException: El nombre de archivo, el nombre de directorio o la sintaxis de la etiqueta del volumen no son correctos. en System.IO.Error.WinIOError(Int32 errorCode, String maybeFullPath) en System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive, Boolean throwOnTopLevelDirectoryNotFound, WIN32_FIND_DATA& data) en System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive, Boolean checkHost) en Xamarin.Android.Tasks.RemoveDirFixed.RunTask()

(sorry if some parts of the error comes in spanish).

The thing here is only when I change mi SDK, I've tried to
1. Clean and rebuilt
2. Install some .NET Compilers in my Xamarin Android Project
3. Install the Xamarin.AndroidX dependencies (That works fine with Android 9 (Pie))
4. Use another machine to compile
5. Change phone
6. Remove old dependencies

Aditionally on my "AndroidManifest" I have a few things but it may help:


 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.company.app" android:installLocation="preferExternal" android:versionName="1.19.1" android:versionCode="19">
     <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="29" />
     <uses-permission android:name="android.permission.CONTROL_LOCATION_UPDATES" />
     <uses-permission android:name="android.permission.INSTALL_LOCATION_PROVIDER" />
     <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
     <!--<uses-permission android:name="android.permission.READ_CONTACTS" />-->
     <uses-permission android:name="android.permission.READ_CALENDAR" />
     <uses-permission android:name="android.permission.WRITE_CALENDAR" />
     <application android:label="app name" android:icon="@drawable/icon" android:usesCleartextTraffic="true">
         <provider android:name="android.support.v4.content.FileProvider" android:authorities="${applicationId}.fileprovider" android:exported="false" android:grantUriPermissions="true">
             <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths"></meta-data>
         </provider>
     </application>
 </manifest>

I've tried also to change the SDK To Android 11 (R) and still the same problem
.
I cannot debug the code because it's unable even to deploy it, it fails before it can be debugged

I've to say I don't even know where to look with this error.

Please if anyone can help me solve this.

Thank you very much everyone! :D





dotnet-xamarin
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @CesarRangel-4591 , could you please post the full error log in english ?Besides, could you please post a basic demo to github or onedriver so that we can test on our side?

0 Votes 0 ·

1 Answer

CesarRangel-4591 avatar image
0 Votes"
CesarRangel-4591 answered

Sorry i forget to post the answer here.

I'm running my project on a Microsoft PC and my source folder was too long.
This specific error ocurred because there is a Path-Limit violation.

So short answer. saved my project folder on a shorter path something like C:\Work \ [Project-Folder]

The solution was very simple but it got me stucked quite some time. I hope this post can help others!!

Thank you very much for all your help

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.