0

Error:

Caused by: java.lang.ClassNotFoundException: Didn't find class "com.android.inputmethod.latin.CarIME" on path: DexPathList[[zip file "/data/app/~~6CnZ_EwlgHaoEjQXjHx4lA==/com.android.inputmethod.latin-gLDFp7uEfMCiBHMTjxVdHA==/base.apk"],nativeLibraryDirectories=[/data/app/~~6CnZ_EwlgHaoEjQXjHx4lA==/com.android.inputmethod.latin-gLDFp7uEfMCiBHMTjxVdHA==/lib/x86_64, /system/lib64, /system_ext/lib64]]

Manifest:

enter image description here

Android.bp file

android_app { name: "CustomKeyboard",

certificate: "platform", privileged: true, platform_apis: true,

manifest: "AndroidManifest.xml",

srcs: ["java/**/*.java"],

resource_dirs: ["res"],

overrides: ["LatinIME"],

 libs: [
        "android.car",      
    ],

aaptflags: ["--auto-add-overlay", "--extra-packages",
"com.google.android.material", "--extra-packages",
"androidx.appcompat", "--extra-packages", "androidx.constraintlayout",
"--extra-packages", "androidx.navigation", ],

static_libs: [ "androidx.appcompat_appcompat",
"com.google.android.material_material",
"androidx-constraintlayout_constraintlayout",
"androidx.navigation_navigation-ui",
"androidx.navigation_navigation-fragment", "android.car", ],

 aapt_include_all_resources: true, optimize: { enabled: false,
//proguard_flags_files: ["proguard.flags"], },

dex_preopt: {
        enabled: true, },

product_variables: {
        pdk: {
            enabled: false,
        },
     }, }

I am trying to override packages/apps/Car/LatinIME/CarLatinIME in the vendor folder and create a custom Keyboard application. I am able to build apk however while running the app custom keyboard crashes. However, I am getting above error. What could be wrong?

2
  • You should always post code in text and not in image, so that it is easier for others to experiment with Commented Jun 14, 2024 at 4:33
  • Why image in place of code ? Commented Jun 18, 2024 at 6:07

1 Answer 1

0

Seems like there's no class com.android.inputmethod.latin.CarIME, the closest I could find in the AOSP source code is com.android.inputmethod.latin.LatinIME and you can find the class here

Probably correcting this in the manifest file will help you proceed with a successful build

<service android:name="com.android.inputmethod.latin.LatinIME"> // Notice the name here
   // Other code
</service>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.