-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Native executable (not working with AWS CRT) again #598
Comments
Are you using GraalVM? |
@jmklix private boolean checkGraalVM() { final boolean IS_AOT = Boolean.parseBoolean(System.getProperty("com.oracle.graalvm.isaot")); |
The OS is Android 10 aarch64 (arm64-v8a) (AOSP) (Android Open Source Project) |
The example code is
Exception is
The log is
|
The log
The logic of code
|
It looks like you're using aws-iot-device-sdk, which does not have Android support. Per the Android instructions, you should be consuming aws-iot-device-sdk-android. |
I try to replace to And I get the error.
Does it possible support the other NDK version? |
We do not request version 20.0.5594570 of the NDK anywhere. NDK is used to compile native code and there is no native C code to be built in aws-iot-device-sdk-java-v2. If you are consuming the sdk as instructed here: https://github.com/aws/aws-iot-device-sdk-java-v2/blob/main/documents/ANDROID.md#consuming-from-maven there is no need for NDK related to this SDK. aws-crt-java, which aws-iot-device-sdk-java-v2 depends on, uses NDK 21.4.7075529 but that shouldn't be relevant here but is further evidence that your current issue is not related to aws-iot-device-sdk-java-v2. I suggest you find out what is requesting that specific version of an NDK (it'll probably be some part of your code that contains native C) and working out whether you can modify it safely to use a different version of the NDK than it is requesting. |
@sbSteveK And it's always shown if no NDK 20.0.5594570 |
Install & run with the apk with the solution #598 (comment). I get this crash.
|
Describe the bug
I get an issue which looks like #408.
The version is 1.21.0.
Java Version: 9.0
Could some one help this? Thanks.
09-27 11:04:32.749 27790 27790 D AndroidRuntime: Shutting down VM
09-27 11:04:32.752 27790 27790 E AndroidRuntime: FATAL EXCEPTION: main
09-27 11:04:32.752 27790 27790 E AndroidRuntime: Process: com.xxxxxxxxx.android.aws_iot_device_service, PID: 27790
09-27 11:04:32.752 27790 27790 E AndroidRuntime: java.lang.ExceptionInInitializerError
09-27 11:04:32.752 27790 27790 E AndroidRuntime: at software.amazon.awssdk.crt.CrtResource.(CrtResource.java:104)
09-27 11:04:32.752 27790 27790 E AndroidRuntime: at software.amazon.awssdk.iot.AwsIotMqtt5ClientBuilder.newDirectMqttBuilderWithMtlsFromPath(AwsIotMqtt5ClientBuilder.java:74)
09-27 11:04:32.752 27790 27790 E AndroidRuntime: at com.xxxxxxxxx.android.aws_iot_device_service.AwsIotDeviceService.setupMqttClientProperty(AwsIotDeviceService.java:211)
09-27 11:04:32.752 27790 27790 E AndroidRuntime: at com.xxxxxxxxx.android.aws_iot_device_service.AwsIotDeviceService.onCreate(AwsIotDeviceService.java:43)
09-27 11:04:32.752 27790 27790 E AndroidRuntime: at android.app.ActivityThread.handleCreateService(ActivityThread.java:3953)
09-27 11:04:32.752 27790 27790 E AndroidRuntime: at android.app.ActivityThread.access$1500(ActivityThread.java:219)
09-27 11:04:32.752 27790 27790 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1875)
09-27 11:04:32.752 27790 27790 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:107)
09-27 11:04:32.752 27790 27790 E AndroidRuntime: at android.os.Looper.loop(Looper.java:252)
09-27 11:04:32.752 27790 27790 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7404)
09-27 11:04:32.752 27790 27790 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
09-27 11:04:32.752 27790 27790 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
09-27 11:04:32.752 27790 27790 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
09-27 11:04:32.752 27790 27790 E AndroidRuntime: Caused by: software.amazon.awssdk.crt.CrtRuntimeException: software.amazon.awssdk.crt.CrtRuntimeException: Unable to unpack AWS CRT library UNKNOWN(-1) UNKNOWN(-1)
09-27 11:04:32.752 27790 27790 E AndroidRuntime: at software.amazon.awssdk.crt.CRT.loadLibraryFromJar(CRT.java:381)
09-27 11:04:32.752 27790 27790 E AndroidRuntime: at software.amazon.awssdk.crt.CRT.(CRT.java:45)
09-27 11:04:32.752 27790 27790 E AndroidRuntime: ... 13 more
Expected Behavior
Pass the crt and run continue.
Current Behavior
Pass the crt and run continue.
Reproduction Steps
Run the code. (10/10)
AwsIotMqtt5ClientBuilder builder =
AwsIotMqtt5ClientBuilder.newDirectMqttBuilderWithMtlsFromPath(
clientEndpoint, certificateData, keyData);
Possible Solution
No response
Additional Information/Context
No response
SDK version used
1.21.0
Environment details (OS name and version, etc.)
Android 10 (AOSP)
The text was updated successfully, but these errors were encountered: