Oreo 以外的应用程序无法正常工作
Application is not working other than Oreo
我创建了一个在 Huawei Mate 10 Lite、Samsung S8 上运行良好的应用程序 Oreo版本 以及 模拟器 .
但它在低于 版本 8 的其他手机上启动时崩溃,显示此 error. Here is my manifest file and app gradle。
第 20 行显示错误,即 SplashActivity 的 setContentView。
`at incrementum.newsapp.activities.SplashScreen.onCreate(SplashScreen.java:20)`
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash_screen);
handler();
}
帮帮我,我要上传到 Appstore。
这可能是同一个问题Resources$NotFoundException: Resource is not a Drawable (color or path)? You're trying to use functionality that was only made available in Oreo and need to find a different way of doing it:
这是您出错的原因
Caused by: android.content.res.Resources$NotFoundException: Resource "incrementum.newsapp:drawable/splash_screen" (7f080081) is not a Drawable (color or path): TypedValue{t=0x1/d=0x7f080081 a=-1 r=0x7f080081}
我认为您将资源放在 drawable-v21
文件夹中,因此如果您使用较低版本,则需要将可绘制对象放在 drawable
文件夹中
我创建了一个在 Huawei Mate 10 Lite、Samsung S8 上运行良好的应用程序 Oreo版本 以及 模拟器 .
但它在低于 版本 8 的其他手机上启动时崩溃,显示此 error. Here is my manifest file and app gradle。
第 20 行显示错误,即 SplashActivity 的 setContentView。
`at incrementum.newsapp.activities.SplashScreen.onCreate(SplashScreen.java:20)`
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash_screen);
handler();
}
帮帮我,我要上传到 Appstore。
这可能是同一个问题Resources$NotFoundException: Resource is not a Drawable (color or path)? You're trying to use functionality that was only made available in Oreo and need to find a different way of doing it:
这是您出错的原因
Caused by: android.content.res.Resources$NotFoundException: Resource "incrementum.newsapp:drawable/splash_screen" (7f080081) is not a Drawable (color or path): TypedValue{t=0x1/d=0x7f080081 a=-1 r=0x7f080081}
我认为您将资源放在 drawable-v21
文件夹中,因此如果您使用较低版本,则需要将可绘制对象放在 drawable
文件夹中