Skip to content Skip to sidebar Skip to footer

Apk Built Using Android.mk Mm Command Not Running In Device After Install

I am following https://wladimir-tm4pda.github.io/porting/build_cookbook.html and have modified Building a simple APK The Android.mk file is at the top level. LOCAL_PATH := $(call m

Solution 1:

I was able to use Soong compilation for my Kotlin Android app. I used the following Android.bp file.

android_app {
  name: "Camera2Video2",
  manifest: "AndroidManifest.xml",
  privileged: true,
  platform_apis: true,
  certificate: "platform",

  srcs: [
    "java/com/example/android/camera2/video/*.kt",
    "java/com/example/android/camera2/video/fragments/*.kt",
    "java/com/example/android/camera2/video/overlay/*.kt",
    "java/com/example/android/camera2/video/utils/*.kt",
  ],

  resource_dirs: [
    "res/",
  ],

  static_libs: [
    "androidx-constraintlayout_constraintlayout",
    "androidx.appcompat_appcompat",
    "androidx.localbroadcastmanager_localbroadcastmanager",
    "com.google.android.material_material",
    "androidx.exifinterface_exifinterface",
    "androidx.core_core",
    "androidx.preference_preference",
    "androidx.fragment_fragment",
  ],

  libs: [
    "telephony-common",
  ],
  optimize: {
        enabled: false,
  },
  dex_preopt: {
    enabled: false,
  },
}

I also tried compiling my Android app after converting it fully to Java. Here is the Android.mk file

LOCAL_PATH := $(call my-dir)include$(CLEAR_VARS)

res_dir := res $(LOCAL_PATH)/res

LOCAL_MODULE_TAGS := optional
#LOCAL_SDK_VERSION := current

LOCAL_SRC_FILES := $(call all-java-files-under, java)

LOCAL_RESOURCE_DIR := $(addprefix$(LOCAL_PATH)/, $(res_dir))
LOCAL_USE_AAPT2 := true

LOCAL_JAVA_LIBRARIES := com.google.android.material_material \

LOCAL_STATIC_ANDROID_LIBRARIES := \
        androidx.appcompat_appcompat \
        androidx-constraintlayout_constraintlayout \
        androidx.preference_preference \
        androidx.fragment_fragment \
        androidx.core_core \

#LOCAL_DEX_PREOPT := false
LOCAL_CERTIFICATE := platform
LOCAL_PRIVILEGED_MODULE := true
#LOCAL_PRODUCT_MODULE := true
LOCAL_PACKAGE_NAME := QMedia
LOCAL_PRIVATE_PLATFORM_APIS := true

include$(BUILD_PACKAGE)

Post a Comment for "Apk Built Using Android.mk Mm Command Not Running In Device After Install"