Je commence à apprendre l'android NDK et j'ai tout de suite rencontré un problème.Android NDK r4 problème san-angeles
J'ai construit la chaîne d'outils (ce qui a pris BEAUCOUP plus longtemps que prévu) et j'ai compilé le code C++ sans problème et maintenant j'essaye de construire le code java.
Instantanément, je rencontre un problème. Il y a un fichier « main.xml »
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Hello World, DemoActivity"
/>
</LinearLayout>
et je reçois les erreurs suivantes:
Description Resource Path Location Type
error: Error: String types not allowed (at 'layout_height' with value 'match_parent'). main.xml /DemoActivity/res/layout line 2 Android AAPT Problem
error: Error: String types not allowed (at 'layout_height' with value 'match_parent'). main.xml /DemoActivity/res/layout line 2 Android AAPT Problem
error: Error: String types not allowed (at 'layout_width' with value 'match_parent'). main.xml /DemoActivity/res/layout line 2 Android AAPT Problem
error: Error: String types not allowed (at 'layout_width' with value 'match_parent'). main.xml /DemoActivity/res/layout line 7 Android AAPT Problem
error: Error: String types not allowed (at 'layout_width' with value 'match_parent'). main.xml /DemoActivity/res/layout line 7 Android AAPT Problem
Je peux donc voir le problème réside dans le fait que ces chaînes « match_parent » sont là-dedans. Quelqu'un sait comment réparer ceci?
Suppression des étiquettes NDK. La question sous sa forme actuelle n'a rien à voir avec le développement NDK ou natif. S'il vous plaît envisager de changer le titre en conséquence! –