xml代码错误使用1
<application
android:name=".InitApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.MapsCOV"/>
<activity android:name=".MainActivity"
>
</activity>
错误使用2
<application
android:name=".InitApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.MapsCOV"/>
<activity android:name=".MainActivity"
/>
代码正确使用1
<application
android:name=".InitApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.MapsCOV">
<activity android:name=".MainActivity"
/>
</application>
正常使用2
<application
android:name=".InitApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.MapsCOV">
<activity android:name=".MainActivity">
</activity>
</application>
在application后面自动生成通常是
<application adroid:name="."
/>
这种情况,如果要使用activity
需将activity自动生成的 “/” 放到外面改成</application>
<application>
<activity android:name=" ">
</activity>
</application>