Can't open Android Native Demos
in Native
Hi, I'm very new to Android Studio and I'm having trouble opening the demos provided in the Android Realtime SDK.
The readme doesn't say what environment these were build in, so I'm assuming it was they work in Android Studio.
I open a project and select the root folder of the project, for example:
/Photon-AndroidNDK-Sdk_v4-1-16-3/Demos/demo_loadBalancing
where the run button normally is there's an option to configure when I configure it as an app and try to run it says it's missing the AndroidManifest.xml
When I load the folder that has the AndroidManifest it says it's missing a module.
I'm also having trouble loading the library into a new project. I can link the C++ library to it, but I then have troubles writing a NetworkLogic controller, or calling the code from Java, but I figure this isn't the place for that so I'm mostly concerned with loading the demo projects and messing around with them
The readme doesn't say what environment these were build in, so I'm assuming it was they work in Android Studio.
I open a project and select the root folder of the project, for example:
/Photon-AndroidNDK-Sdk_v4-1-16-3/Demos/demo_loadBalancing
where the run button normally is there's an option to configure when I configure it as an app and try to run it says it's missing the AndroidManifest.xml
When I load the folder that has the AndroidManifest it says it's missing a module.
I'm also having trouble loading the library into a new project. I can link the C++ library to it, but I then have troubles writing a NetworkLogic controller, or calling the code from Java, but I figure this isn't the place for that so I'm mostly concerned with loading the demo projects and messing around with them
0
Comments
-
Hi @ImMilesAhead.
The demo projects ship with makefiles for NDK-build and with VisualGDB projects.
Android Studio is not necessary to build and run the demo projects. You can either use Visual Studio with VisualGDB or run the plain makefiles directly from the command line.
You can create Android Studio projects for the demos buy following the guides at https://developer.android.com/studio/projects/add-native-code.
See https://developer.android.com/studio/projects/gradle-external-native-builds for how to add native libraries like the Photon Android libraries to your project.
Note that wherever those guides differentiate between cmake and NDK-build, you should go with the NDK-build instructions.0 -
0
-
Thanks @Daguo that link has gotten me almost all the way but I can't get the ndk-build to run properly.
I'm trying to build the library using ndk-build but I get an error:C:\Users\Miles\AppData\Local\Android\Sdk\ndk\21.3.6528147\build\ndk-build.cmd C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/prebuilt-library.mk:45: *** Android NDK: Aborting . Stop. Android NDK: WARNING: APP_PLATFORM android-22 is higher than android:minSdkVersion 1 in ./AndroidManifest.xml. NDK binaries will *not* be compatible with devices older than android-22. See https://android.googlesource.com/platform/ndk/+/master/docs/user/common_problems.md for more information. Android NDK: ERROR:jni/../../../../../../LoadBalancing-cpp/lib/loadbalancing-cpp-prebuilt/../../../Common-cpp/lib/common-cpp-prebuilt/Android.mk:common-cpp-static-prebuilt: LOCAL_SRC_FILES points to a missing file Android NDK: Check that jni/../../../../../../LoadBalancing-cpp/lib/loadbalancing-cpp-prebuilt/../../../Common-cpp/lib/common-cpp-prebuilt/libcommon-cpp-static_release_android_arm64-v8a_libc++.a exists or that its path is correct Process finished with exit code 2
I've checked and double checked the paths and all the Android.mk files, but I can't get it to compile
I've even copied and pasted the file path from the terminal and it goes to the correct directory, so I don't think I'm insane.0 -
Hi @ImMilesAhead:
This looks like a path-length issue. Due to the way how ndk-build works it can happen on Windows that you cross the maximum limit length limit of Windows when you include 3rd party libs in Android projects that are located at relatively long directory paths.
Try moving your project to a shorter path.
For a quick check if this is indeed the cause of the problem, you can simply copy your project folder to a location like C:/a.0 -
so it seems it was a path issue, as I was able to get the .so files compiled.
Now however I can't access any of the native functions from within Java. I copied from DemoActivity.java and it crashes on startup. idk if I need to import anything, but I tried leaving the activity blank and was able to runt he app with the compiled c++ code not doing anything. I try to call startDemo(); in onCreate(Bundle savedInstanceState) and the app crashes.0 -
0
-
2020-09-11 09:04:46.782 25039-25039/com.cerebralclutch.clutchbowling E/h.clutchbowlin: No implementation found for void com.cerebralclutch.clutchbowling.MainActivity.startDemo() (tried Java_com_cerebralclutch_clutchbowling_MainActivity_startDemo and Java_com_cerebralclutch_clutchbowling_MainActivity_startDemo__) 2020-09-11 09:04:46.782 25039-25039/com.cerebralclutch.clutchbowling D/AndroidRuntime: Shutting down VM 2020-09-11 09:04:46.783 25039-25039/com.cerebralclutch.clutchbowling E/AndroidRuntime: FATAL EXCEPTION: main Process: com.cerebralclutch.clutchbowling, PID: 25039 java.lang.IllegalStateException: Could not execute method for android:onClick at androidx.appcompat.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:414) at android.view.View.performClick(View.java:6597) at android.view.View.performClickInternal(View.java:6574) at android.view.View.access$3100(View.java:778) at android.view.View$PerformClick.run(View.java:25885) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6669) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Method.invoke(Native Method) at androidx.appcompat.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:409) at android.view.View.performClick(View.java:6597) at android.view.View.performClickInternal(View.java:6574) at android.view.View.access$3100(View.java:778) at android.view.View$PerformClick.run(View.java:25885) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6669) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) Caused by: java.lang.UnsatisfiedLinkError: No implementation found for void com.cerebralclutch.clutchbowling.MainActivity.startDemo() (tried Java_com_cerebralclutch_clutchbowling_MainActivity_startDemo and Java_com_cerebralclutch_clutchbowling_MainActivity_startDemo__) at com.cerebralclutch.clutchbowling.MainActivity.startDemo(Native Method) at com.cerebralclutch.clutchbowling.MainActivity.StartDemo(MainActivity.java:52) at java.lang.reflect.Method.invoke(Native Method) at androidx.appcompat.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:409) at android.view.View.performClick(View.java:6597) at android.view.View.performClickInternal(View.java:6574) at android.view.View.access$3100(View.java:778) at android.view.View$PerformClick.run(View.java:25885) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6669) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) 2020-09-11 09:04:46.794 25039-25039/com.cerebralclutch.clutchbowling I/Process: Sending signal. PID: 25039 SIG: 9
0 -
Hi , @ImMilesAhead
E/h.clutchbowlin: No implementation found for void com.cerebralclutch.clutchbowling.MainActivity.startDemo() (tried Java_com_cerebralclutch_clutchbowling_MainActivity_startDemo and Java_com_cerebralclutch_clutchbowling_MainActivity_startDemo__)
1.Your package name is "com.cerebralclutch.clutchbowling".
2.You can check the code is found "Java_com_cerebralclutch_clutchbowling_MainActivity_startDemo" in main.cpp.
3. You should replace "demo.android.loadBalancing" by "com.cerebralclutch.clutchbowling".replace "DemoActivity" by "MainActivity" .0 -
I have just one last error, I finally got everything working so long as the package name is demo_android_loadBalancing
if it's anything other than this I get a connection error 1023
specifically the app loads logsconnecting to Photon received connection error 1023 disconnected
I changed the function names in main.cpp like @Daguo said and the app compiles and runs fine except for this error.
Nothing shows up in Logcat, but in the Run tab I getE/Photon-Demo: 2020-09-14 15:58:11,131649 ERROR PeerBase.cpp onConnect() 422 4294967295 2020-09-14 15:58:11,132142 ERROR NetworkLogic.cpp connectionErrorReturn() 371 code: 1023
0 -
actually that shows up in logcat too, I didn't change what package it was monitoring0
-
Running the command with -d flag gives me this
GNU Make 4.2.1 Built for x86_64-w64-mingw32 Copyright (C) 1988-2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. find_and_set_shell() setting default_shell = cmd Reading makefiles... Reading makefile 'C:\Users\Miles\AppData\Local\Android\Sdk\ndk\21.3.6528147\build\\..\build\core\build-local.mk'... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/init.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/definitions.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/gmsl/gmsl' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/gmsl/__gmsl' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/definitions-tests.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/definitions-utils.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/definitions-host.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/definitions-graph.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/version.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/add-platform.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/add-platform.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/add-platform.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/add-platform.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/add-platform.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/add-platform.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/add-platform.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/add-platform.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/add-platform.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/add-platform.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/add-platform.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/add-platform.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/add-platform.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/abis.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/platforms.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/add-toolchain.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/toolchains/aarch64-linux-android-clang/config.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/add-toolchain.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/toolchains/arm-linux-androideabi-clang/config.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/add-toolchain.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/toolchains/x86-clang/config.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/add-toolchain.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/toolchains/x86_64-clang/config.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/add-application.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/Desktop/photon-androidndk-sdk_v4-1-16-3/Photon-AndroidNDK-Sdk_v4-1-16-3/Demos/demo_loadBalancing/app/src/main/jni/Application.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/setup-app-platform.mk' (search path) (no ~ expansion)... CreateProcess(C:\Users\Miles\AppData\Local\Android\Sdk\ndk\21.3.6528147\prebuilt\windows-x86_64\bin\python.exe,C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../prebuilt/windows-x86_64/bin/python.exe C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/extract_manifest.py minSdkVersion C:/Users/Miles/Desktop/photon-androidndk-sdk_v4-1-16-3/Photon-AndroidNDK-Sdk_v4-1-16-3/Demos/demo_loadBalancing/app/src/main/AndroidManifest.xml,...) Main thread handle = 00000000000000E8 CreateProcess(C:\Users\Miles\AppData\Local\Android\Sdk\ndk\21.3.6528147\prebuilt\windows-x86_64\bin\python.exe,C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../prebuilt/windows-x86_64/bin/python.exe C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/extract_manifest.py debuggable C:/Users/Miles/Desktop/photon-androidndk-sdk_v4-1-16-3/Photon-AndroidNDK-Sdk_v4-1-16-3/Demos/demo_loadBalancing/app/src/main/AndroidManifest.xml,...) Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/setup-imports.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/build-all.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/setup-app.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/setup-abi.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/setup-toolchain.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/default-build-commands.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/toolchains/aarch64-linux-android-clang/setup.mk' (search path) (no ~ expansion)... CreateProcess(C:\Users\Miles\AppData\Local\Android\Sdk\ndk\21.3.6528147\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe,C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -print-resource-dir,...) Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/gdb.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../sources/cxx-stl/llvm-libc++/Android.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/clear-vars.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/prebuilt-static-library.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/prebuilt-library.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/build-module.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/clear-vars.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/prebuilt-shared-library.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/prebuilt-library.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/build-module.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../sources/cxx-stl/llvm-libc++abi/Android.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/clear-vars.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/prebuilt-static-library.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/prebuilt-library.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/build-module.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../sources/android/support/Android.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/Desktop/photon-androidndk-sdk_v4-1-16-3/Photon-AndroidNDK-Sdk_v4-1-16-3/Demos/demo_loadBalancing/app/src/main/jni/Android.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/clear-vars.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/build-shared-library.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/build-module.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/Desktop/photon-androidndk-sdk_v4-1-16-3/Photon-AndroidNDK-Sdk_v4-1-16-3/Demos/demo_loadBalancing/app/src/main/jni/../../../../../../LoadBalancing-cpp/lib/loadbalancing-cpp-prebuilt/Android.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/clear-vars.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/prebuilt-static-library.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/prebuilt-library.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/build-module.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/Desktop/photon-androidndk-sdk_v4-1-16-3/Photon-AndroidNDK-Sdk_v4-1-16-3/Demos/demo_loadBalancing/app/src/main/jni/../../../../../../LoadBalancing-cpp/lib/loadbalancing-cpp-prebuilt/../../../Common-cpp/lib/common-cpp-prebuilt/Android.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/clear-vars.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/prebuilt-static-library.mk' (search path) (no ~ expansion)... Reading makefile 'C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/prebuilt-library.mk' (search path) (no ~ expansion)... Android NDK: WARNING: APP_PLATFORM android-22 is higher than android:minSdkVersion 1 in C:/Users/Miles/Desktop/photon-androidndk-sdk_v4-1-16-3/Photon-AndroidNDK-Sdk_v4-1-16-3/Demos/demo_loadBalancing/app/src/main/AndroidManifest.xml. NDK binaries will *not* be compatible with devices older than android-22. See https://android.googlesource.com/platform/ndk/+/master/docs/user/common_problems.md for more information. Android NDK: ERROR:C:/Users/Miles/Desktop/photon-androidndk-sdk_v4-1-16-3/Photon-AndroidNDK-Sdk_v4-1-16-3/Demos/demo_loadBalancing/app/src/main/jni/../../../../../../LoadBalancing-cpp/lib/loadbalancing-cpp-prebuilt/../../../Common-cpp/lib/common-cpp-prebuilt/Android.mk:common-cpp-static-prebuilt: LOCAL_SRC_FILES points to a missing file Android NDK: Check that C:/Users/Miles/Desktop/photon-androidndk-sdk_v4-1-16-3/Photon-AndroidNDK-Sdk_v4-1-16-3/Demos/demo_loadBalancing/app/src/main/jni/../../../../../../LoadBalancing-cpp/lib/loadbalancing-cpp-prebuilt/../../../Common-cpp/lib/common-cpp-prebuilt/libcommon-cpp-static_release_android_arm64-v8a_libc++.a exists or that its path is correct C:/Users/Miles/AppData/Local/Android/Sdk/ndk/21.3.6528147/build//../build/core/prebuilt-library.mk:45: *** Android NDK: Aborting . Stop.
0 -
Hi @ImMilesAhead.
As you can see in the link that @Daguo has provided, the connection issue might simply come from a missing Internet-permission in the manifest file. Have you checked that?
What is the context of your last post?
It looks like you are back to the path length issue.0 -
uh... idk why that posted now. I posted that a week ago. I got a message that it would post when it was approved or something. Probably because it's so long. but yeah that was back with the path length issue0
-
also i've got the permissions, and I can connect when the package name is demo.android.loadBalancing, but not when I change the package name. I've tried both starting with a different package name and changing it after the project is created.
I've made sure to change all refrences in the main.cpp (otherwise it would crash)
also just to make sure I just paste<permission-group android:name="android.permission-group.NETWORK" /> <uses-permission android:name="android.permission.INTERNET" />
into the root of the AndroidManifest.xml
it looks like this now<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.cerebralclutch.clutchbowling"> <permission-group android:name="android.permission-group.NETWORK" /> <uses-permission android:name="android.permission.INTERNET" /> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme"> <activity android:name=".MainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>
0 -
it looks like it's just com.cerebralclutch.clutchbowling that I can't connect. If I set it to something different like com.clutch.bowling it works fine.0
-
Hi @ImMilesAhead.
Google restricts the max length for the package name to 30 characters (apparently 50 characters if you only want to support very recent Android versions and set the API version accordingly high, but I have not tested this).
"com.cerebralclutch.clutchbowling" is 32 characters long a hence 2 characters beyond that limit.
Shortening it by 2 or more characters should do the trick.uh... idk why that posted now. I posted that a week ago. I got a message that it would post when it was approved or something. Probably because it's so long. but yeah that was back with the path length issue0