How Get rid of NDK compiler warning: “APP_PLATFORM is larger..” and “Invalid package”

后端 未结 3 1483
粉色の甜心
粉色の甜心 2021-01-02 03:49

I have the following Application.mk

APP_PLATFORM := android-9
APP_STL := gnustl_static
APP_CPPFLAGS := -frtti -fexceptions -O2 -mfpu=neon -mfloat-abi=softfp
         


        
相关标签:
3条回答
  • 2021-01-02 04:03

    For NDK rev r9 (works in others too but line# may differ)

    ${NDK}/build/core/add-application.mk line 138

    add "#" at start of the line.

    # $(call __ndk_info,WARNING: APP_PLATFORM $(APP_PLATFORM) is larger than android:minSdkVersion $(APP_MIN_PLATFORM_LEVEL) in $(APP_MANIFEST))

    One character, 30 second fix ... go debug native code.

    0 讨论(0)
  • 2021-01-02 04:03

    You can fix this by performing the following steps in Eclipse:

    • Window -> Preferences -> C/C++ -> Build -> Settings
    • Select CDT GNU C/C++ Error Parser
    • In the Error Parser options at the bottom, add a new entry with the following contents:

    Severity: Warning

    Pattern: (.?):(\d+): Android NDK: WARNING:(.)

    File: $1

    Line: $2

    Description: $3

    That should convert this to a warning, and you can choose to ignore this as well - depending on the severity it will show up in the Problems view.

    0 讨论(0)
  • 2021-01-02 04:16

    Regarding "package", this is most likely some crlf problem with your XML file. Check the line end characters there. Or, maybe something is wrong in your project.properties file.

    The APP_PLATFORM warning is actually correct: your APP_PLATFORM (android-14) is larger than android:minSdkVersion you set in AndroidManifest.xml. This is only a warning to remind you about this (legitimate) situation, so that at certain stage you decide to drop support for very dated devices.

    0 讨论(0)
提交回复
热议问题