Можно ли создать приложение для Android с помощью Android.bp?
Я попытался сгенерировать файл Android.bp из файла Android.MK с помощью следующей команды
androidmk Android.mk > Android.bp
И результирующий файл Android.bp выглядит так:
// ANDROIDMK TRANSLATION ERROR: unsupported assignment to LOCAL_RESOURCE_DIR
// LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res frameworks/support/v7/appcompat/res frameworks/support/design/res
TARGET_ABI = ["x86_64"]
android_app {
srcs: ["src/**/*.java"],
name: "ResourceDemo",
static_libs: ["android-support-v4"] + ["android-support-v7-appcompat"],
certificate: "platform",
// ANDROIDMK TRANSLATION ERROR: unsupported assignment to LOCAL_PRIVILEGED_MODULE
// LOCAL_PRIVILEGED_MODULE := true
// ANDROIDMK TRANSLATION ERROR: unsupported assignment to LOCAL_USE_AAPT2
// LOCAL_USE_AAPT2 := true
// ANDROIDMK TRANSLATION ERROR: unsupported assignment to LOCAL_DEX_PREOPT
// LOCAL_DEX_PREOPT := true
// ANDROIDMK TRANSLATION ERROR: unsupported assignment to LOCAL_PROGUARD_ENABLED
// LOCAL_PROGUARD_ENABLED := nosystem
// ANDROIDMK TRANSLATION ERROR: unsupported assignment to LOCAL_PROGUARD_FLAG_FILES
// LOCAL_PROGUARD_FLAG_FILES := proguard.flags
aaptflags: ["--auto-add-overlay"],
product_variables: {
pdk: {
enabled: false,
},
},
}
После выполнения команды make build я получил следующую ошибку
[1/1] out/soong/.bootstrap/bin/minibp out/soong/.bootstrap/build.ninja
[2/2] out/soong/.bootstrap/bin/minibp out/soong/.bootstrap/build.ninja
[1/1] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
FAILED: out/soong/build.ninja
out/soong/.bootstrap/bin/soong_build -t -b out/soong -d
out/soong/build.ninja.d -o out/soong/build.ninja Android.bp
error: packages/apps/ResourceDemo/Android.bp:1:1: "ResourceDemo" depends on undefined module "core-libart"
error: packages/apps/ResourceDemo/Android.bp:1:1: "ResourceDemo" depends on undefined module "core-oj"
error: packages/apps/ResourceDemo/Android.bp:1:1: "ResourceDemo" depends on undefined module "core-libart"
error: packages/apps/ResourceDemo/Android.bp:1:1: "ResourceDemo" depends on undefined module "ext"
error: packages/apps/ResourceDemo/Android.bp:1:1: "ResourceDemo" depends on undefined module "framework"
error: packages/apps/ResourceDemo/Android.bp:1:1: "ResourceDemo" depends on undefined module "okhttp"
error: packages/apps/ResourceDemo/Android.bp:1:1: "ResourceDemo" depends on undefined module "android-support-v4"
error: packages/apps/ResourceDemo/Android.bp:1:1: "ResourceDemo" depends on undefined module "android-support-v7-appcompat"
error: packages/apps/ResourceDemo/Android.bp:1:1: "ResourceDemo" depends on undefined module "framework-res"
ninja: build stopped: subcommand failed.
09:21:36 soong failed with: exit status 1
#### failed to build some targets (3 seconds) ####
помогите собрать с помощью Android.bp