Android NDK r4 san-angeles问题

我开始学习Android NDK,并且立即遇到了一个问题。

我build立了工具链(比我期待的要花费更多的时间),而且我已经编译了C ++代码,现在我正在尝试构buildJava代码。

我立即想出了一个问题。 有一个文件“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> 

我得到以下错误:

 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 

所以我可以看到问题在于这些“match_parent”string在那里。 有人知道怎么修这个东西吗?

检查你正在使用的API级别 。

FILL_PARENT已在API级别8(Android 2.2)中重命名为MATCH_PARENT