question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android 8 IllegalArgumentException: No such service

See original GitHub issue

Hi running this plugin on a oneplus 3t with android 8.0 I receive the following error: java.lang.IllegalArgumentException: No such service ComponentInfo{com.example.myproject/org.altbeacon.beacon.service.ScanJob}

To make it work I had to add the following lines to the AndroidManifest.xml:

<service android:permission="android.permission.BIND_JOB_SERVICE" android:name="org.altbeacon.beacon.service.ScanJob"> </service>

and

<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

Please you could fix this thanks

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:30 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
vienomcommented, Mar 22, 2018

Actually its better to change the permissions in the plugin.xml. Faced some issues with the above solution. Here is a fork where you can see the changes: https://github.com/vienom/cordova-plugin-ibeacon

2reactions
vienomcommented, Mar 22, 2018

The target of a service is the application, the target of the uses-permission is the manifest. Try it like this:

<edit-config file="AndroidManifest.xml" mode="add" target="/manifest/application"> <service android:name="org.altbeacon.beacon.service.ScanJob" android:permission="android.permission.BIND_JOB_SERVICE" /> </edit-config> <edit-config file="AndroidManifest.xml" mode="add" target="/manifest"> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> </edit-config>

Read more comments on GitHub >

github_iconTop Results From Across the Web

No such service ComponentInfo JobScheduler - Stack Overflow
You need to add the permission android.permission. ... My issue was that my Service was defined as an static inner class. The issue...
Read more >
Java.Lang.IllegalArgumentException: No such service ...
User388416 posted. I am using Xamarin Android to build an app which should allow the app keep sending driver's location every 15 minutes...
Read more >
IllegalArgumentException - Android Developers
IllegalThreadStateException, Thrown to indicate that a thread is not in an appropriate state for the requested operation.
Read more >
JobIntentService is crashing in an AsyncTask on Android O
IllegalArgumentException : Given work is not active: JobWorkItem{id=1 intent=Intent ... 3) Test with an Android 7.1 and Android 8 emulator (8 will crash)...
Read more >
com/android/server/job/JobSchedulerService.java - Google Git
private static final int DEFAULT_STANDBY_FREQUENT_BEATS = 43; // ~ 8 hours ... throw new IllegalArgumentException("No such service " + service);.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found