我的 strings.xml 文件中有一个字符串,例如
<string name="my_text">Hello <b>$%1$s</b>, android is cool <b>bold me</b></string>
Run Code Online (Sandbox Code Playgroud)
检索带有粗体样式的文本的唯一方法是使用
resources.getText(R.string.my_text);
虽然问题是 getText 没有为我希望提供的参数采用额外的参数,例如采用诸如
resources.getString(R.string.my_text, "I WILL BE BOLDED")
如果我使用 getString 我失去了粗体,如果我使用 getText 我不能传递参数我如何获得两者?
我不断得到一个
忍者:错误:'/root/code/CalcLib/libCalcLibAndroidx86.a',需要'/root/code/compcorpsdk/build/intermediates/cmake/prod/release/obj/x86/libJumboFFT.so',丢失且未知制定规则
虽然我检查了两个目录是否存在正确的文件,但我相信我在 CmakeList.txt 中正确设置了包含目录路径。
CMakeLists.txt
cmake_minimum_required(VERSION 3.4.1)
set(
P1 "/root/code/CalcLib"
CACHE STRING ""
)
message(${ANDROID_ABI})
file(GLOB CPP_FILES "*.cpp")
add_library(
JumboFFT
SHARED
${CPP_FILES}
)
include_directories(src/main/jni)
include_directories(${P1})
target_link_libraries(
JumboFFT
log
android
OpenSLES
${P1}/libCalcLibAndroid${ANDROID_ABI}.a
)
Run Code Online (Sandbox Code Playgroud)
Gradle Assemble 输出 Gradle Asemble 输出文本