Sysprogs forums › Forums › VisualGDB › Android Gradle Flavors Tutorial Issue
Tagged: android gradle
- This topic has 6 replies, 2 voices, and was last updated 4 years, 2 months ago by support.
-
AuthorPosts
-
September 3, 2020 at 11:01 #28977RunGamesJayParticipant
Quick question: Is the Co-developing Android projects with Gradle Flavors with Visual Studio tutorial still valid? I have not been able to get valid APKs before adding:
installed_modules: $(dir $(NDK_APP_GDBSERVER))/libgdbserver.so
$(dir $(NDK_APP_GDBSERVER))/libgdbserver.so: $(NDK_APP_GDBSERVER)
copy /y $(subst /,\,$(NDK_APP_GDBSERVER) $(dir $(NDK_APP_GDBSERVER))/libgdbserver.so)
del $(subst /,\,$(NDK_APP_GDBSERVER))to the Android.mk as adding this causes the Gradle to error out on the last 2 lines of this code and not build at all.
Can anyone else verify if this tutorial still works: https://visualgdb.com/tutorials/android/astudio/flavors/
Thanks
September 3, 2020 at 11:20 #28978RunGamesJayParticipantA short follow-up as I forget this:
Error: INSTALL_FAILED_INVALID_APK: Failed to extract native libraries, res=-2
That is the error I get and both the libHelloLibrary.so and gdbserver are present in the apk.
September 3, 2020 at 16:48 #28981supportKeymasterHi,
This looks like some device-specific issue. Please try creating a project with Android Studio and make sure it can be installed on the device. Then, try importing it into VisualGDB as shown in this tutorial: https://visualgdb.com/tutorials/android/cmake/
September 8, 2020 at 10:34 #29004RunGamesJayParticipantTime for an update, I was able to create and install onto my Android device the Cmake tutorial from Android Studio.
Unfortunately, upon creating the VisualGDB project, I am first prompted with “Could not detect the compiler version from you make file. You may need to specify additional build arguments (e.g. NDK_MODULE_PATH). Ignore and continue?” regardless of using AndroidManifest.xml or gradlew.bat.After ignoring and continuing the creation of the project, I get the following error: “Toolchain test failed: Cannot query the value of TARGET_CXX. Please double-check your settings. If you ignore this error, your project may not build.” I cannot continue from there just as in this post from the past.
I am on the latest Android Studio as well as VisualGDB version 5.5 (Preview 7, build 3769) and Visual Studio 2017.
Is there a location that you know of that I can add the missing value? Please advise.
Thank you.
September 13, 2020 at 11:18 #29048supportKeymasterLooks like you are trying to import an Android Studio project without any native files. Please double-check that you have created the C/C++ sources with Android Studio, and that the original project builds and works before you try importing it into VisualGDB.
September 14, 2020 at 09:38 #29067RunGamesJayParticipantAs mentioned previously, I was able to follow the tutorial all the way to step 8 without errors as well as installing and running the app so far on the phone. It says “Hello from C++” as is written in native-lib.cpp and referenced from the native call to stringFromJNI() in MainActivity.java. All of this is visible from Android Studio and I can see everything in the project.
So all is in order before importing to VisualGDB as far as the tutorial is concerned. Still unresolved issue.
Please advise.
Thank you.
September 14, 2020 at 10:11 #29068supportKeymasterNo problem. We have added it to the backlog. As we are prioritizing several other issues over it, it may take a few weeks for us to fully investigate this and provide a workaround. We will post an update here once the issue is resolved.
-
AuthorPosts
- You must be logged in to reply to this topic.