NanoPC T3 - Android Lollipop GPIO Access
Posted: Fri Feb 23, 2018 11:41 am
Hello All,
I have a NanoPC T3, and I am running Android Lollipop which is the image provided by FriendlyArm. I am trying to implement a GPIO App, with referring to the examples given on github.
After having the jniLibs folder placed in the project, and using the Hardwarecontroler.java file, I am getting an error.
E/art: No implementation found for int com.agent.trimiti.tmaservices.AndroidSDK.HardwareControler.exportGPIOPin(int) (tried Java_com_agent_trimiti_tmaservices_AndroidSDK_HardwareControler_exportGPIOPin and Java_com_agent_trimiti_tmaservices_AndroidSDK_HardwareControler_exportGPIOPin__I)
D/AndroidRuntime: Shutting down VM
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.agent.trimiti.tmaservices, PID: 27167
java.lang.UnsatisfiedLinkError: No implementation found for int com.agent.trimiti.tmaservices.AndroidSDK.HardwareControler.exportGPIOPin(int) (tried Java_com_agent_trimiti_tmaservices_AndroidSDK_HardwareControler_exportGPIOPin and Java_com_agent_trimiti_tmaservices_AndroidSDK_HardwareControler_exportGPIOPin__I)
at com.agent.trimiti.tmaservices.AndroidSDK.HardwareControler.exportGPIOPin(Native Method)
at com.agent.trimiti.tmaservices.HardwareInterfaceImpl.<init>(HardwareInterfaceImpl.java:102)
at com.agent.trimiti.tmaservices.TmaMain.<init>(TmaMain.java:57)
at java.lang.reflect.Constructor.newInstance(Native Method)
at java.lang.Class.newInstance(Class.java:1606)
at android.app.Instrumentation.newActivity(Instrumentation.java:1066)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2226)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
Application terminated.
After the stack trace the Android Application Crashes. I have tried many methods to get the Hardware part running, but it is not functional.
I hope someone on the forum can help me in this.
Couple of questions:
Do I need a root access for accessing the hardware ?
Do I have to do any special changes in the app so that I can have the hardware working.
System Information:
Linux, Android Studio
Nano PC T3 with Android Lollipop
Thank You and Cheers !
Rohan
I have a NanoPC T3, and I am running Android Lollipop which is the image provided by FriendlyArm. I am trying to implement a GPIO App, with referring to the examples given on github.
After having the jniLibs folder placed in the project, and using the Hardwarecontroler.java file, I am getting an error.
E/art: No implementation found for int com.agent.trimiti.tmaservices.AndroidSDK.HardwareControler.exportGPIOPin(int) (tried Java_com_agent_trimiti_tmaservices_AndroidSDK_HardwareControler_exportGPIOPin and Java_com_agent_trimiti_tmaservices_AndroidSDK_HardwareControler_exportGPIOPin__I)
D/AndroidRuntime: Shutting down VM
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.agent.trimiti.tmaservices, PID: 27167
java.lang.UnsatisfiedLinkError: No implementation found for int com.agent.trimiti.tmaservices.AndroidSDK.HardwareControler.exportGPIOPin(int) (tried Java_com_agent_trimiti_tmaservices_AndroidSDK_HardwareControler_exportGPIOPin and Java_com_agent_trimiti_tmaservices_AndroidSDK_HardwareControler_exportGPIOPin__I)
at com.agent.trimiti.tmaservices.AndroidSDK.HardwareControler.exportGPIOPin(Native Method)
at com.agent.trimiti.tmaservices.HardwareInterfaceImpl.<init>(HardwareInterfaceImpl.java:102)
at com.agent.trimiti.tmaservices.TmaMain.<init>(TmaMain.java:57)
at java.lang.reflect.Constructor.newInstance(Native Method)
at java.lang.Class.newInstance(Class.java:1606)
at android.app.Instrumentation.newActivity(Instrumentation.java:1066)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2226)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
Application terminated.
After the stack trace the Android Application Crashes. I have tried many methods to get the Hardware part running, but it is not functional.
I hope someone on the forum can help me in this.
Couple of questions:
Do I need a root access for accessing the hardware ?
Do I have to do any special changes in the app so that I can have the hardware working.
System Information:
Linux, Android Studio
Nano PC T3 with Android Lollipop
Thank You and Cheers !
Rohan