Tôi bắt đầu tìm hiểu NDK của Android và tôi đã ngay lập tức nảy sinh một vấn đề.Android NDK r4 san-angeles vấn đề
Tôi đã xây dựng chuỗi công cụ (mất nhiều thời gian hơn tôi mong đợi !!) và tôi đã biên dịch mã C++ mà không gặp vấn đề gì và bây giờ tôi đang cố gắng xây dựng mã java.
Ngay lập tức tôi nảy sinh một vấn đề. Có một tập tin "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>
và tôi nhận được các lỗi sau đây:
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
Vì vậy, tôi có thể thấy vấn đề nằm trong thực tế là những "match_parent" chuỗi đang chờ ở đó. Bất cứ ai cũng biết làm thế nào để sửa lỗi này?
Đã xóa các thẻ NDK. Câu hỏi hiện tại không có liên quan gì đến NDK hoặc phát triển bản địa. Hãy xem xét việc thay đổi tiêu đề cho phù hợp! –