Open Vishwa4jeet opened 5 years ago
Cloned the app from the GoGameAndroid branch, and tried running it with its current state. Following issue were obeserved:
Currently the app doesn't has any readme file written or some screenshots attached so trying to understand how the app runs before I can try and modify it.
Observed Error : Fix : To fix this added a gradle.properties file in the project structure with org.gradle.jvmargs=-Xmx1536M.
Observed Error :
Fix : To fix this downloaded the NDK bundle and added it to the project structure.
Observed Error :
Fix : Searched for this on the internet and came across a similar issue on git(https://github.com/google/filament/issues/15). Tried few of the possible solutions as suggested on this page. The one that worked was updating the android plugin version to 3.1.0
Observed Error : Fix : Based on info in the error message, updated the gradle version to 4.4
Since the android gradle plugin was updated to 3.1.0 had to update the Android SDK Build Version Tools to 27.0.3 which is the minimum supported version for corresponding gradle version.
Observed Error : Fix : Could fix this by adding release signing for the app by executing export KEYSTORE_PASSWORD=storepass keytool -genkey -v -keystore release.keystore -storepass storepass -alias krelease -keypass storepass -keyalg RSA -keysize 2048 -validity 10000
Post this the build was successful.
Tried running the app from the IDE post build. Currently since the code uses the old sapphire code, so tried starting it the old way where we passed the AppEntryPoint as argument while starting the oms. The app starts with the below homescreen :
But when trying to start the game it fails with an error message of 'Failed to start pachi engine' pop up on the app screen and the following error log W/System.err: java.io.IOException: Cannot run program "/data/data/net.lrstudios.android.pachi/app_engines/pachi" (in directory "/data/data/net.lrstudios.android.pachi/app_engines"): error=2, No such file or directory
Finally we are able to make Kernel Server up and Pachi Micro Service deployed. But at some point it is trying to make Pachi engine up as a process. Build process failed over there with error "not able to find Pachi binary". @AmitRoushan and I have tried to debug and we located Pachi binary but location of binary is not as per path of build. We are not sure why this error and where to put binary.
@quinton-hoole-2 @sungwook-moon We are currently stuck at this point. So, any input would be valuable in driving this forward.
I discussed with Hong and we perhaps need to discuss further in our next sync-up. Basically, binary for Android should be under resources: https://github.com/Huawei-PaaS/DCAP-Sapphire-Examples/tree/GoGameAndroid/app/src/main/res
Pachi engine is C++ and the current source code uses it via Linux pipeline to execute the binary of the Pachi engine. This is because the original Pachi engine was coded in C++ and use Caffe platform which involves some challenges at making work with Amino as it is (e.g., use direct JNI like License plate)
You will need to compile and put the binary in appropriate location on Android device to make it run (local option in app). Hong mentioned this will work on kernel server running on Android but won't work on the other servers such as cloud instance or Ubuntu servers (cloud option in app). To make it run on cloud or servers, you will need to compile them and adjust a bit to make it work because C++ is platform dependent and some dependencies need to be resolved differently.