的Andr​​oid NDK R4 SAN-洛杉矶问题 [英] Android NDK r4 san-angeles problem

查看:146
本文介绍了的Andr​​oid NDK R4 SAN-洛杉矶问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开始了解了Android NDK,我会立刻碰到一个问题。

I'm starting to learn the android NDK and I've instantly come up against a problem.

I'e内置的工具链(它花了很多的时间比我期待!),我已经编译的C ++ code,没有任何问题,现在我试图建立在Java $ C $ ℃。

I'e built the tool chain (which took a LOT longer than I was expecting!!) and I've compiled the C++ code with no problems and now I'm trying to build the java code.

瞬间我碰到的一个问题。有一个文件main.xml中

Instantly I come up against a problem. There is a 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>

和我得到了以下错误:

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字符串都在那里。任何人都知道如何解决这个问题?

So I can see the problem lies in the fact that these "match_parent" strings are in there. Anyone know how to fix this?

推荐答案

检查所 API级别。

FILL_PARENT 更名为 MATCH_PARENT 的API等级8(Android 2.2的)。

FILL_PARENT was renamed to MATCH_PARENT in API Level 8 (Android 2.2).

这篇关于的Andr​​oid NDK R4 SAN-洛杉矶问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆