Skip to content Skip to sidebar Skip to footer

Java.lang.classnotfoundexception: Didn't Find Class "com.google.android.things.pio.peripheralmanagerservice"

How do I solve this RunTimeException ? This exception occurs when a click is made on the button. Tried turning off Instant Run and even tried cleaning and restarting the applicatio

Solution 1:

I had a similar issue, and it turns out in my manifest, I did not have <uses-library android:name="com.google.android.things"/>. I would try removing android:required="false", as it is clearly required by your application.

Solution 2:

The PeripheralManagerService class was renamed, you need to use PeripheralManager class instead.

Type:

import com.google.android.things.pio.PeripheralManager;

Instead of:

import com.google.android.things.pio.PeripheralManagerService;

Also Type:`

PeripheralManager manager;

Instead of:

PeripheralManagerService manager;

And finally Type:

manager = PeripheralManager.getInstance();

Instead of:

manager = new PeripheralManagerService();

Also check this question:

PeripheralManagerService throws NoClassDefFoundError

`

Post a Comment for "Java.lang.classnotfoundexception: Didn't Find Class "com.google.android.things.pio.peripheralmanagerservice""