如何摆脱NDK编译器警告:" APP_PLATFORM较大.."和"无效的包" [英] How Get rid of NDK compiler warning: "APP_PLATFORM is larger.." and "Invalid package"

查看:186
本文介绍了如何摆脱NDK编译器警告:" APP_PLATFORM较大.."和"无效的包"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下Application.mk

I have the following Application.mk

APP_PLATFORM := android-9
APP_STL := gnustl_static
APP_CPPFLAGS := -frtti -fexceptions -O2 -mfpu=neon -mfloat-abi=softfp
APP_ABI := armeabi-v7a
LOCAL_ARM_NEON := true

和运行NDK的构建时,我总是得到警告:

and when running ndk-build I always get the warnings:

Invalid attribute name: 
    package
/Users/tmanthey/Documents/android/android-ndk-r8d/build/core/add-application.mk:128: Android NDK: WARNING: APP_PLATFORM android-14 is larger than android:minSdkVersion  in ./AndroidManifest.xml    
Invalid attribute name: 
    package

这是我的Andr​​oidManifest.xml

This is my AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.evotegra.aCoDriver"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="17" />

    <uses-permission android:name="android.permission.CAMERA" />

    <uses-feature android:name="android.hardware.camera" />
    <uses-feature android:name="android.hardware.camera.autofocus" />

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.VIBRATE"/>

    <application
        android:name=".ACoDriverApp"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" android:allowBackup="true">
        <activity
            android:name=".ACoDriverActivity"
            android:label="@string/app_name" android:launchMode="singleTask">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name="PreferencesActivity" />
        <activity android:name="GaugeSelectActivity" />
    </application>

</manifest>

如何才能摆脱这些警告?

How can I get rid of these warnings?

推荐答案

对于包,这很可能是一些 CRLF 问题,您的XML文件。检查线路结束字符那里。或者,也许什么是错在你的 project.properties 文件。

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.

该APP_PLATFORM警告实际上是正确的:你APP_PLATFORM(机器人-14)是比Android大:你的minSdkVersion在AndroidManifest.xml中设置。这仅仅是一个警告,提醒你这个(合法的)的情况,因此在一定阶段就决定放弃对非常过时设备的支持。

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.

这篇关于如何摆脱NDK编译器警告:&QUOT; APP_PLATFORM较大..&QUOT;和&QUOT;无效的包&QUOT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆