我想要爲Android 4.2設備編程,但我擁有的書是教Android 4.0叫Beginning Android App Development 4。所以,我有針對性運行於Android 4.2的第一個程序問題:Android 4.0 vs 4.2 API差異
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello" />
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="This is my first Android Application!" />
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="And this is a clickable button!" />
</LinearLayout>
error: Error: No resource found that matches the given name (at 'text' with value '@string/hello'). activity_main.xml /HelloWorld/res/layout line 7 Android AAPT Problem
[I18N] Hardcoded string "And this is a clickable button!", should use @string resource activity_main.xml /HelloWorld/res/layout line 20 Android Lint Problem
[I18N] Hardcoded string "This is my first Android Application!", should use @string resource activity_main.xml /HelloWorld/res/layout line 15 Android Lint Problem
我想我在哪裏可以找到從4.2 4.0 API之間的差異?我應該繼續閱讀這本書嗎?
謝謝,看起來這本書假定你是一個專業版而不是一個初學者,它充斥着大量的代碼,幾乎沒有任何解釋,任何關於更改本書的建議? – user963241
我個人沒有閱讀任何有關Android的書,所以我無法幫助你。是通過提供的教程和文檔,因爲它們實際上很徹底。https://developer.android.com/training/index.html –