-1

I added a described question sometime ago, Signed APK, “App not installed” in some devices, and in some devices same apk is working fine The issue is stil unsolved

But just now I noticed that it is working fine on android devices on version 7.1.* and above, but below that it isn' working. Even it isn't working on emulator with MarshMallow. But I have set the minimum sdk on 18, so it should work fine. You can the Manifest, Gradle(app and project level) files on the questioon I provided link to.

1 Answers1

0

For layout failures, you need to read the cause of the cause of the cause (etc) in your stack trace until you find the original error.

According to the stack trace, the issue is with your resource drawable/car_background.

Caused by: android.content.res.Resources$NotFoundException: Resource "com.diginfoexpert.MBAutodeals:drawable/car_background" (7f070069) is not a Drawable (color or path): TypedValue{t=0x1/d=0x7f070069 a=-1 r=0x7f070069}

I'm not really sure why the issue would present on 7.1 devices. The only hint that may or may not be relevant according to 7.1 release notes is added support for circular launcher icons. I don't really see anything in 7.0 either.

Couple other off hand possibilities:

  • Maybe you are using a vector asset and it is malformed.
  • Maybe you are using a vector asset and not using app:srcCompat.
  • Maybe you have an invalid file of name car_background in an API specific resource bucket.

Hopefully, this will get you on the right track.

methodsignature
  • 3,524
  • 2
  • 15
  • 21
  • Thanks. No the app is working perfectly on My device which is Redmi 4, Nougat 7.1.2. It is also working on my friends' devices which are above 7.1.*. ... 8 or above 8... But the error is occuring on devices below 7.1, like 7.0. On MArshmallow it is geting installed but crashing the moment I open it. If there was a problem with drawable/car_background, it should also have crsahed on my device too. But it is working fine on my device. – Samarpit Shrivastava Jul 10 '19 at 11:08
  • if the asset isn't the root cause, why does the stack trace say it is the issue. do your self a favor and investigate. at least remove the asset from the layout and run the app on the failing device to rule it out... or just keep flailing in the dark when you haven't even ruled out the one lead the stack trace points to. – methodsignature Jul 11 '19 at 04:19
  • Also, look into what might case a `Resources$NotFoundException`. – methodsignature Jul 11 '19 at 04:24
  • I have already tried by removing the asset and its usages, still it's not working. The car_background is being used as the background for the splash screen. I removed it and put a blank white screen as the background for that view, still it's not working. The error is the same, "app not installed". – Samarpit Shrivastava Jul 11 '19 at 10:51
  • ^ that was a more useful response. you should probably have separated out the crash on launch as it is a separate issue (still probably related to the image asset). you also didn't point out that you are trying to resolve "app not installed" at the moment. Have you looked through the list of solutions here: https://stackoverflow.com/questions/4226132/app-not-installed-error-on-android? – methodsignature Jul 11 '19 at 14:30