0

I have created an app which is working fine on Huawei Mate 10 Lite,Samsung S8 both are Oreo version and also on emulator.

But it's crashing on startup on other phones below version 8, showing this error. Here is my manifest file and app gradle.

It is showing error on line 20 which is setContentView of SplashActivity.

`at incrementum.newsapp.activities.SplashScreen.onCreate(SplashScreen.java:20)`
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_splash_screen);
    handler();
}

Help me I am about to upload on Appstore.

Ubaid Tanoli
  • 183
  • 14

2 Answers2

1

This is the cause of your error

  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}

I think your put your ressource inside a drawable-v21 folder so if you use a lower version you need to put your drawable inside the drawable folder

Vodet
  • 1,491
  • 1
  • 18
  • 36
  • You just need to rename your folder to drawable, or you can create it and put your drawable inside it – Vodet Oct 01 '18 at 12:33
0

It's probably same issue as this 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: Newer versions of Android Studio and only two drawable directory - drawable and drawable-v21

Paul Hadfield
  • 6,088
  • 2
  • 35
  • 56