Java Android NDK r4 san-angeles问题
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3000131/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Android NDK r4 san-angeles problem
提问by Goz
I'm starting to learn the android NDK and I've instantly come up against a problem.
我开始学习 android NDK,我立即遇到了一个问题。
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.
我构建了工具链(花费的时间比我预期的要长很多!!)并且我已经毫无问题地编译了 C++ 代码,现在我正在尝试构建 java 代码。
Instantly I come up against a problem. There is a file "main.xml"
我立刻遇到了一个问题。有一个文件“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>
and I get the following errors:
我收到以下错误:
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
So I can see the problem lies in the fact that these "match_parent" strings are in there. Anyone know how to fix this?
所以我可以看到问题在于这些“match_parent”字符串在那里。有人知道怎么修这个东西吗?