Ad
Java.lang.NoClassDefFoundError: Failed Resolution Of: Landroid/app/job/JobInfo$TriggerContentUri;
I am using JobScheduler with addTriggerContentUri observing for any changes in the specific content uri. When I run the app I get the above exception.
Ad
Answer
addTriggerContentUri
is available in JobInfo in API 24 (Nougat) and above. If you try this in any device below API 24 you won’t get any compile time error but during run time Android will try to find the addTriggerContentUri in JobInfo which won’t be available and will throw above exception
(Caused
by: java.lang.ClassNotFoundException: Didn't find class "android.app.job.JobInfo$TriggerContentUri" on path: DexPathList[[zip file "/data/app/).
Solution : You can have API level check before calling this method.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
....
}
Ad
source: stackoverflow.com
Related Questions
- → should I choose reactjs+f7 or f7+vue.js?
- → Phonegap Android write to sd card
- → Local reference jquery script in nanohttpd (Android)
- → Click to navigate on mobile devices
- → How to allow api access to android or ios app only(laravel)?
- → Access the Camera and CameraRoll on Android using React Native?
- → React native change listening port
- → What is the default unit of style in React Native?
- → Google play market autocomplete icon
- → Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of `ListView`
- → Using Laravel with Genymotion
- → react native using like web-based ajax function
- → react native pdf View
Ad