Error in running Ketai example code.

edited December 2017 in Android Mode

Dear Friends,

I am trying to run Accelerometer example of Ketai library. I am using Huawei Y3 2017 3G. The selected SDK target is 6.0 (23), and processing is showing no connected device. The USB debugging is on

The code is also not running on Emulator. The folder at location C:\Users\AhmedAli.android\avd is empty.

Following are the sdk tools that are installed to my PC:

(Tools) Android SDK Tools Rev:24.2.5,
Android SDK Plateform-Tools Rev:25.0.6

(Tools Preview Channel) Android SDK Built-tools Rev:26 rc1,

(Android 6.0 (API 23)) SDK Plateform,
ARM EABI v7a system image,
Google APIs,
Sources for Android APIs,

(. Extras) Google USB Driver,

Following are the warnings on running code, on device and on Emulator.


  1. WARNING in C:\Users\AhmedAli\AppData\Local\Temp\android6528098508794274311sketch\src\processing\test\accelerometer\Accelerometer.java (at line 4) import processing.data.*; ^^^^^^^^^^^^^^^

The import processing.data is never used

  1. WARNING in C:\Users\AhmedAli\AppData\Local\Temp\android6528098508794274311sketch\src\processing\test\accelerometer\Accelerometer.java (at line 5) import processing.event.*; ^^^^^^^^^^^^^^^^

The import processing.event is never used

  1. WARNING in C:\Users\AhmedAli\AppData\Local\Temp\android6528098508794274311sketch\src\processing\test\accelerometer\Accelerometer.java (at line 6) import processing.opengl.*; ^^^^^^^^^^^^^^^^^

The import processing.opengl is never used

  1. WARNING in C:\Users\AhmedAli\AppData\Local\Temp\android6528098508794274311sketch\src\processing\test\accelerometer\Accelerometer.java (at line 10) import java.util.HashMap; ^^^^^^^^^^^^^^^^^

The import java.util.HashMap is never used

  1. WARNING in C:\Users\AhmedAli\AppData\Local\Temp\android6528098508794274311sketch\src\processing\test\accelerometer\Accelerometer.java (at line 11) import java.util.ArrayList; ^^^^^^^^^^^^^^^^^^^

The import java.util.ArrayList is never used

  1. WARNING in C:\Users\AhmedAli\AppData\Local\Temp\android6528098508794274311sketch\src\processing\test\accelerometer\Accelerometer.java (at line 12) import java.io.File; ^^^^^^^^^^^^

The import java.io.File is never used

  1. WARNING in C:\Users\AhmedAli\AppData\Local\Temp\android6528098508794274311sketch\src\processing\test\accelerometer\Accelerometer.java (at line 13) import java.io.BufferedReader; ^^^^^^^^^^^^^^^^^^^^^^

The import java.io.BufferedReader is never used

  1. WARNING in C:\Users\AhmedAli\AppData\Local\Temp\android6528098508794274311sketch\src\processing\test\accelerometer\Accelerometer.java (at line 14) import java.io.PrintWriter; ^^^^^^^^^^^^^^^^^^^

The import java.io.PrintWriter is never used

  1. WARNING in C:\Users\AhmedAli\AppData\Local\Temp\android6528098508794274311sketch\src\processing\test\accelerometer\Accelerometer.java (at line 15) import java.io.InputStream; ^^^^^^^^^^^^^^^^^^^

The import java.io.InputStream is never used

  1. WARNING in C:\Users\AhmedAli\AppData\Local\Temp\android6528098508794274311sketch\src\processing\test\accelerometer\Accelerometer.java (at line 16) import java.io.OutputStream; ^^^^^^^^^^^^^^^^^^^^

The import java.io.OutputStream is never used

  1. WARNING in C:\Users\AhmedAli\AppData\Local\Temp\android6528098508794274311sketch\src\processing\test\accelerometer\Accelerometer.java (at line 17) import java.io.IOException; ^^^^^^^^^^^^^^^^^^^

The import java.io.IOException is never used


  1. WARNING in C:\Users\AhmedAli\AppData\Local\Temp\android6528098508794274311sketch\src\processing\test\accelerometer\MainActivity.java (at line 11) import android.support.v4.content.ContextCompat; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The import android.support.v4.content.ContextCompat is never used

  1. WARNING in C:\Users\AhmedAli\AppData\Local\Temp\android6528098508794274311sketch\src\processing\test\accelerometer\MainActivity.java (at line 15) import android.Manifest; ^^^^^^^^^^^^^^^^

The import android.Manifest is never used

  1. WARNING in C:\Users\AhmedAli\AppData\Local\Temp\android6528098508794274311sketch\src\processing\test\accelerometer\MainActivity.java (at line 49) int check; ^^^^^

The value of the local variable check is not used

14 problems (14 warnings)

following is the error on running code on Emulator: error

Answers

  • @first===

    warnings do not matter; error is claiming about your system images: go to your SDK and have a look to the folder called system-images: is the 23 system image present here?

  • Yes it is present SDK_image

    The device is not connect. I am also trying to run on device: not_connected

  • Please continue the discussions of your issue in the same post, so let's keep it here. Some other comments found at: https://forum.processing.org/two/discussion/24880/my-phone-cant-be-connected#latest

    How did you install the SDK? This might not matter for now, but it seems you install your SDK inside your Android Mode folder. I would say this is inconvenient. If there is an update of the AM, this folder will be removed and replaced with a newer version.

    Kf

  • Thanks for your reply. I have installed the SDK manually. Yes there is an update of the Android Mode. I am now updating my Android Mode and will reply you later if there is any issue.

  • You can tell us what AM you are using and you can do that easily if you go to the library manager in the Processing IDE, go to modes and click in Android. At the bottom of this dialog window you'll see some info, including version. Another way is to go to your Android Mode folder. You need to go to your sketch folder (Fille>>Preferences and note the location of your sketchbook) then go there, and then directly to folder modes>>AndroidMode. There is a file called mode.properties. Open it and your version is under version or prettyVersion.

    Kf

Sign In or Register to comment.