Android
AND-401 · Question #127
Consider the following AndroidManifest.xml file: <?xml version="1.0" encoding="utf-8"?> package="mycube.test" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="8"…
The correct answer is C. the package name must be "com.mycube.test". See the full explanation below for the reasoning.
Question
Consider the following AndroidManifest.xml file:
<?xml version="1.0" encoding="utf-8"?> package="mycube.test" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="17" /> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@android:style/Theme.Light.NoTitleBar" > <activity android:name=".Menu" android:screenOrientation="portrait" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> <uses-permission android:name="android.permission.INTERNET"></uses- permission> <activity android:name=".Compute" android:screenOrientation="portrait" /> </manifest> What is the syntax error of this file?Options
- AThe INTERNET permission must be removed.
- BTag uses-sdk must have attribute android:maxSdkVersion set.
- Cthe package name must be "com.mycube.test".
- DThe <activity> tag for Activity ".Compute" should be contained inside <application> tag.
How the community answered
(25 responses)- A4% (1)
- B12% (3)
- C80% (20)
- D4% (1)
Community Discussion
No community discussion yet for this question.