Android Gradle Flavors Tutorial Issue

Sysprogs forums Forums VisualGDB Android Gradle Flavors Tutorial Issue

This topic contains 6 replies, has 2 voices, and was last updated by  support 4 days, 3 hours ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #28977

    RunGamesJay
    Participant

    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

     

    #28978

    RunGamesJay
    Participant

    A 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.

    #28981

    support
    Keymaster

    Hi,

    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/

    #29004

    RunGamesJay
    Participant

    Time 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.

    #29048

    support
    Keymaster

    Looks 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.

    #29067

    RunGamesJay
    Participant

    As 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.

    #29068

    support
    Keymaster

    No 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.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.