Je commence à apprendre l’android NDK et je me heurte instantanément à un problème.
J’ai construit la chaîne d’outils (qui a pris BEAUCOUP plus de temps que ce à quoi je m’attendais !!) et j’ai compilé le code C ++ sans problème et j’essaie maintenant de créer le code Java.
Instantanément, je me heurte à un problème. Il y a un fichier “main.xml”
et j’obtiens les erreurs suivantes:
Description Resource Path Location Type error: Error: Ssortingng types not allowed (at 'layout_height' with value 'match_parent'). main.xml /DemoActivity/res/layout line 2 Android AAPT Problem error: Error: Ssortingng types not allowed (at 'layout_height' with value 'match_parent'). main.xml /DemoActivity/res/layout line 2 Android AAPT Problem error: Error: Ssortingng types not allowed (at 'layout_width' with value 'match_parent'). main.xml /DemoActivity/res/layout line 2 Android AAPT Problem error: Error: Ssortingng types not allowed (at 'layout_width' with value 'match_parent'). main.xml /DemoActivity/res/layout line 7 Android AAPT Problem error: Error: Ssortingng types not allowed (at 'layout_width' with value 'match_parent'). main.xml /DemoActivity/res/layout line 7 Android AAPT Problem
Donc, je peux voir que le problème réside dans le fait que ces chaînes “match_parent” sont là. Quelqu’un sait comment réparer ceci?
Vérifiez quel niveau d’API vous utilisez.
FILL_PARENT
été renommé MATCH_PARENT
en API niveau 8 (Android 2.2).