Sto iniziando a imparare l'NDK di Android e ho subito trovato un problema.Android NDK r4 san-angeles problema
Ho costruito la catena di strumenti (che ha richiesto molto più tempo di quanto mi aspettassi !!) e ho compilato il codice C++ senza problemi e ora sto cercando di creare il codice java.
Immediatamente mi viene un problema. C'è un file "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>
ed ottengo i seguenti errori:
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
così posso vedere il problema sta nel fatto che queste stringhe "match_parent" sono in là. Qualcuno sa come risolvere questo?
Rimosso i tag NDK. La domanda così com'è ora non ha nulla a che fare con NDK o sviluppo nativo. Per favore considera di cambiare il titolo di conseguenza! –