Failed to load AppCompat ActionBar with unknown error
Failed Error to with load unknown ActionBar
2023-09-14 09:01:10 时间
前言
今天安装写一个test的demo的时候,创建项目的时候出现这个错误。
然后我想啊,谁会去用这个actionBar啊,然后我找到main下的androidManifect.xml:
<application
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.AppCompat.Light.NoActionBar">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".notificationActivity">
</activity>
</application>
改成了:@style/Theme.AppCompat.Light.NoActionBar 反正我不使用就行呗,真正的项目谁会用这个东西哦。
然后就傻眼了,跳转到下一页,没有返回键。
看来还是要有一个bar的。
解决
在androidmanifect.xml 不变,还是android:theme="@style/AppTheme"
然后再style.xml中改下。
百度的:
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
改为:
<style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">
相关文章
- ERROR tool.ImportTool: Import failed: java.io.IOException: java.lang.ClassNotFoundException: org.apache.hadoop.hive.conf.HiveConf
- ELASTICSEARCH7.4 免费启用X-PACK插件 设置账号、权限 包含错误--ERROR: FAILED TO SET PASSWORD FOR USER [APM_SYSTEM]
- ERROR [org.apache.hadoop.util.Shell] - Failed to locate the winutils binary in the hadoop binary path
- Tomcat启动报Error listenerStart错误 Context [] startup failed due to previous errors
- GConf error:Failed to contact configuration server
- 更新setuptools和pip时报错Command "python setup.py egg_info" failed with error code 1 in
- 宇视摄像机/NVR OCX插件插件安装出现:Failed to register ocx, error code 14001 错误的解决方法
- yum 卸载 error: %preun(tengine-2.1.0-1.el6.x86_64) scriptlet failed, exit status 6
- error: %preun(keepalived-1.2.7-3.el6.x86_64) scriptlet failed, exit status 1 解决
- 【25】报错PluginlibFactory: The plugin for class‘rviz_imu_plugin/Imu’ failed to load. Error: According
- cordova报错:Error: Failed to find ‘ANDROID_HOME‘ environment variable. Try setting setting it manually
- Custom tool error: Failed to generate code for the service reference ××××××. Please check other erro
- 成功解决OpenCV Error: Assertion failed (scn == 3 || scn == 4) in cv::cvtColor
- 解决OpenCV问题:OpenCV Error: Assertion failed (!empty()) in cv::CascadeClassifier::detectMultiScale,
- mac使用puppeteer报错,UnhandledPromiseRejectionWarning: Error: Failed to launch the browser process!
- Command "python setup.py egg_info" failed with error code 1
- 【错误记录】Android Studio 编译报错 ( AAPT: error: failed to read PNG signature: file does not start with PN )
- 嵌入式linux开发,C/C++交叉编译报错:xxx.mak:41: recipe for target ‘xxx.o‘ failed make: *** [xxx.o] Error 127
- 解决办法:git错误 error: failed to push some refs to 'https://github.com/...
- Error:com.android.builder.internal.aapt.AaptException: Failed to crunch file E:AndroidSourceexampl
- 【异常】MyBatis-Plus提示报错MybatisPlusException: Failed to process, Error SQL
- 解决办法:git错误 error: failed to push some refs to 'https://github.com/...