J'ai créé l'application Xamarin Forms. J'utilise multidex pour Android (nombreuses bibliothèques). J'utilise le fichier multidex.keep avec l'option MultiDexMainDexList. Maintenant, le déploiement est le travail. Mais je me exception en mode débogage:Xamarin Android avec multidex - bug en mode débogage
System.ArgumentException: The offset and length have exceeded the bounds of the array or the counter value exceeds the number of elements from the pointer to the end of the original collection.
в System.Buffer.BlockCopy(Array src, Int32 srcOffset, Array dst, Int32 dstOffset, Int32 count)
в Mono.Cecil.Metadata.GuidHeap.Read(UInt32 index)
в Mono.Cecil.MetadataReader.InitializeCustomDebugInformations()
в Mono.Cecil.MetadataReader.GetCustomDebugInformation(ICustomDebugInformationProvider provider)
в Mono.Cecil.Cil.PortablePdbReader.Read(MethodDefinition method)
в Mono.Cecil.Cil.CodeReader.ReadMethodBody()
в Mono.Cecil.Cil.CodeReader.ReadMethodBody(MethodDefinition method)
в Mono.Cecil.MethodDefinition.<>c.<get_Body>b__41_0(MethodDefinition method, MetadataReader reader)
в Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TRet& variable, TItem item, Func`3 read)
в Mono.Cecil.MethodDefinition.get_Body()
Mono.Cecil.MethodDefinition.get_DebugInformation()
в Mono.Debugging.Soft.SoftDebuggerSession.LoadPdbType(TypeDefinition type, Dictionary`2 fileToSourceFileInfos)
в Mono.Debugging.Soft.SoftDebuggerSession.LoadPdbFile(String assemblyFileName, String pdbFileName)
в Mono.Debugging.Soft.SoftDebuggerSession.LoadDebugFile(String assemblyFileName, String debugFileName, Func`3 loadDebugFile)
в Mono.Debugging.Soft.SoftDebuggerSession.CheckBetterMatch(TypeMirror type, String file, Int32 line, Int32 column, Location found)
в Mono.Debugging.Soft.SoftDebuggerSession.FindLocationByMethod(MethodMirror method, String file, Int32 line, Int32 column, Boolean& insideTypeRange)
в Mono.Debugging.Soft.SoftDebuggerSession.FindLocationByType(TypeMirror type, String file, Int32 line, Int32 column, Boolean& genericMethod, Boolean& insideTypeRange)
в Mono.Debugging.Soft.SoftDebuggerSession.ResolveBreakpoints(TypeMirror type)
в Mono.Debugging.Soft.SoftDebuggerSession.HandleTypeLoadEvents(TypeLoadEvent[] events)
в Mono.Debugging.Soft.SoftDebuggerSession.HandleEventSet(EventSet es)
в Mono.Debugging.Soft.SoftDebuggerSession.EventHandler()
Pour une analyse que j'utilise - dex2jar et Java Decompiler (par ce article). Mais maintenant je ne sais pas quoi chercher et quels sont les problèmes.
Des idées?
Cela se passe donc dans une configuration 'Debug'. L'exception ci-dessus ressemble plus à un problème de connexion au débogueur doux. Comme il n'y a aucune trace d'une tâche Multidex dans la trace ci-dessus, j'hésite à dire que c'est lié à Multidex jusqu'à ce que nous ayons une reproduction minimale. Pouvez-vous en ajouter un à votre message? –
Bonjour, Jon. Mon débogueur fonctionne maintenant! C'était un problème avec mon projet. J'ai XF 2.3.4.247 dans mon projet. J'ai installé XF 2.3.5.239 (pré), puis l'ai supprimé et installé la version stable 2.3.4.247. Et après que le débogage a fonctionné. Merci pour votre blog - c'est une information très utile. J'attends votre livre sur Xamarin Android. – FetFrumos