我想要为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 –