Home > Mobile >  Android Studio the NDK development in C/C + + code without grammar tips, unable to debug or the red.
Android Studio the NDK development in C/C + + code without grammar tips, unable to debug or the red.

Time:09-27


Have machine system is Windows 10 + AndroidStudio3.4 (3.2 tried), C/C + + code no hint of grammar can't debug, but compile completely no problem, all kinds of clear the cache restart all tried is not line, just reinstall the same engineering in other good machine is OK,



Another good machine (MAC) is ok, but the upgrade of the NDK after C, C + + code all a lot of the red, but can debug, tried to uninstall the NDK, download again to specify the NDK version, various kinds of clear the cache also not line,

CodePudding user response:

I also like before, then don't know how to have tips,,, will be the cause of the SDK

CodePudding user response:

It should not be the cause of the SDK, the pack is installed,

CodePudding user response:

The current use of the SDK version uninstall in reshipment try restart
I run into XML so dry without prompting

CodePudding user response:

reference Krisez reply: 3/f
used in the current version of the SDK unloading in heavy restart try
I met the XML without prompting such dry

What you said is the NDK version, android SDK 5 6 7 8 9 10 I have installed, uninstall all try again?

CodePudding user response:

No, just the SDK

You are currently using SDK version

CompileSdkVersion which is how much is unloading
28 - & gt; Android 9
Etc.

CodePudding user response:

1. DefaultConfig {
ExternalNativeBuild {
Cmake {
The arguments' - DANDROID_STL=_static c + + '
CppFlags "- STD=14 c + +"
}
}
}
2. Cmakelist
# set include folder address
Include_directories (${CMAKE_SOURCE_DIR}/SRC/main/CPP/include/)
Set (CMAKE_VERBOSE_MAKEFILE on)

Aux_source_directory (. DIR_LIB_SRCS)
Aux_source_directory (./object_tracking OTHER_SRC_LIST)
The list (APPEND DIR_LIB_SRCS ${OTHER_SRC_LIST})


# Creates the names of a library, and sets it as either the STATIC
# or SHARED, and provides the relative paths to its source code.
# You can define multiple libraries, and CMake builds them for You.
# Gradle automatically packages Shared libraries with your APK.


Add_library (# Sets the name of the library.
Native - lib

# Sets the library as a Shared library.
SHARED

# Provides a relative path to the source file (s).
The ${DIR_LIB_SRCS}
)

CodePudding user response:

I use other software is to write c + +, and then compiled into so it in the android test

CodePudding user response:

Tried to travel snails, Krisez methods are not


reference 7 floor for funny reply:
I use other software to write c + +, and then compiled into so it in the android test


Is to use VS?

CodePudding user response:

I before 3.2 don't be marked red, upgraded to 3.5 jni lot of all is the appearance of an error, but does not affect the compilation, don't know what reason be
  • Related