gpt4 book ai didi

android-ndk - 为arm处理器构建android adb

转载 作者:行者123 更新时间:2023-12-05 00:04:12 36 4
gpt4 key购买 nike

我想在 ARM 平台上使用 Android ADB 工具。构建脚本中的命令之一是:

arm-eabi-g++
-I build/libs/host/include/host
-I build/libs/host/include
-I build/libs/host
-I out/host/linux-arm/obj/STATIC_LIBRARIES/libhost_intermediates
-I dalvik/libnativehelper/include/nativehelper
-I system/core/include
-I hardware/libhardware/include
-I hardware/libhardware_legacy/include
-I hardware/ril/include
-I dalvik/libnativehelper/include
-I frameworks/base/include
-I frameworks/base/opengl/include
-I frameworks/base/native/include
-I external/skia/include
-I tools/include
-I out/host/linux-arm/obj/include
-I prebuilt/ndk/android-ndk-r5b/platforms/android-9/arch-arm/usr/include
-c -fno-exceptions -Wno-multichar -fPIC
-include system/core/include/arch/linux-arm/AndroidConfig.h
-D_FORTIFY_SOURCE=0
-DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -O2 -g -fno-strict-aliasing -DNDEBUG -UDEBUG
-DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -Wsign-promo -DNDEBUG -UDEBUG
-MD -o out/host/linux-arm/obj/STATIC_LIBRARIES/libhost_intermediates/pseudolocalize.o
build/libs/host/pseudolocalize.cpp

我已经确保安装了最新的 ndk-r5b,这应该可以解决 STL 问题。但是,我仍然收到以下错误:
In file included from build/libs/host/pseudolocalize.cpp:1:
build/libs/host/include/host/pseudolocalize.h:4:18: error: string: No such file or directory
In file included from build/libs/host/pseudolocalize.cpp:1:
build/libs/host/include/host/pseudolocalize.h:6: error: 'string' in namespace 'std' does not name a type
build/libs/host/pseudolocalize.cpp: In function 'const char* pseudolocalize_char(char)':
build/libs/host/pseudolocalize.cpp:61: error: 'NULL' was not declared in this scope
build/libs/host/pseudolocalize.cpp: At global scope:
build/libs/host/pseudolocalize.cpp:71: error: 'string' does not name a type

有谁知道如何解决这个问题?顺便说一句,通过以下链接构建 adb 的 intel 版本可以正常工作:

http://lackingrhoticity.blogspot.com/2010/02/how-to-build-adb-android-debugger.html

最佳答案

adb 不需要pseudolocalize.cpp。并且 NDK 工具链旨在使用仿生(Android libc)构建。 adb 需要 glibc(GNU libc) 来构建。

我创建了一个 Makefile 来为 Linux/ARM 编译 adb。这个 Makefile 为 Linux/ARM 制作静态链接的 adb 可执行二进制文件,因此它也适用于 Android/ARM。

  • standalone Makefile for adb

  • 怎么做。
  • 安装 Sourcery G++ Lite for ARM和 GNU Make。
  • 下载“Android source code”。
  • 保存 Makefile作为系统/核心/亚行/Makefile。
  • cd 系统/核心/亚行;制作。
  • 关于android-ndk - 为arm处理器构建android adb,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5904765/

    36 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com