0
votes

I am using Android studio 1.02 on Linux Mint. I was able to successfully debug my code on android emulators and my device LG G2 till yesterday. Today when I started my workstation I cant 'debug' my code.

It says:

Error running navigationbar: java.lang.Error : no Connectors loaded. Check your JDK installation.

On my device I can see the message:

Waiting for the Debugger

Application NavigationBar (com.example.test.navigationbar) is waiting for the debugger to attach.

and following are the console messages

Waiting for device. Target device: lge-lg_My_DEVICE'sID Uploading file local path: /path-to-apk/apk/navigationbar-debug.apk remote path: /data/local/tmp/com.example.test.navigationbar Installing com.example.test.navigationbar DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.example.test.navigationbar" pkg: /data/local/tmp/com.example.test.navigationbar Success

Launching application: com.example.test.navigationbar/com.example.test.navigationbar.NavigationBar. DEVICE SHELL COMMAND: am start -D -n "com.example.test.navigationbar/com.example.test.navigationbar.NavigationBar" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.example.test.navigationbar/.NavigationBar }

Waiting for process: com.example.test.navigationbar Can't start debugging.

As advices on some older posts. I have already tried :

  1. android:debuggable="true"
  2. Restarting android studio and my PC
  3. Uncheck and then select again 'Enable ADB integration'
  4. Try to debug on emulator(gives the same problem)
  5. Make a new program from the android-studio's templates and try to debug it

On the other hand if I 'run' my application. It gives no such error.

Finally, if I run android.sh form my terminal then I get this message after I choose my device:

java.util.ServiceConfigurationError: com.sun.jdi.connect.Connector: Provider com.sun.tools.jdi.SunCommandLineLauncher could not be instantiated java.util.ServiceConfigurationError: com.sun.jdi.connect.Connector: Provider com.sun.tools.jdi.RawCommandLineLauncher could not be instantiated java.util.ServiceConfigurationError: com.sun.jdi.connect.Connector: Provider com.sun.tools.jdi.SocketAttachingConnector could not be instantiated java.util.ServiceConfigurationError: com.sun.jdi.connect.Connector: Provider com.sun.tools.jdi.SocketListeningConnector could not be instantiated

Kindly advice steps to resolve this issue. Thanks

Some links I already tried:

  1. Not Able To Debug App In Android Studio
1

1 Answers

0
votes

Finally I uninstalled my JDK8 and installed JDK7 this time. Then if I open Android-Studio. It gave the errors that 'jdk8 not found'. Upon this I typed :

rm -R -f ~/.AndroidStudio/

To delete all the settings related to Android-Studio. Now when you run Android studio it will ask you to install/initialize it again.

That worked for me!! Note: Till now I was working comfortably with JDK8. Only today due to some change I got the error.