我的AndroidManifest.xml文件出了点问题。我又启动了一次测试,突然Android Studio崩溃了,再次启动,然后发生了下一个错误(对不起,我的评分不够,不能直接上传图片)。
我的strings.xml文件没有问题。
<resources>
<string title="app_name">PaySpaceMagazine</string>
<string title="hello_world">Hello world!</string>
<string title="action_settings">Settings</string>
<string title="actual">Актуально</string>
<string title="last_news">Последние известия</string>
还有其他的manifest文件也没有任何错误。
<?xml version="1.0" encoding="utf-8"?>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MainActivity"
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>
有人遇到过同样的问题吗?
在你发布的截图中的Manifest中,你使用的是 android:title
而不是 android:name
为您 Activity
s. 改用
android:name=".MainActivity"
财产是强制性的。您可以阅读更多 此处
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
试着把你的清单文件改成这样
这就是问题所在,它没有从字符串中提取,它应该显示应用程序名称
android:label="@stringapp_name"
最简单的解决方法是创建新的应用程序,打开manifest,复制这一行,让用户不要按它,否则你会再次中断字符串粘贴到你的中断字符串上,如果你想改变名称,请到字符串xml中改变名称。