# Troubleshooting

### 1. /android/capacitor-cordova-android-plugins/libs/cordova-generic-ad.jar does not exist

This error is generated because Cordova-AdMob is not directly supported by Capacitor.&#x20;

The problem is the dependency plugin `cordova-plugin-extension`, it has a gradle file at `src/android/rjfun-libs.gradle` which indicates Cordova to compile the `cordova-generic-ad.jar`, but doing that makes it search in a relative place instead of in the right place.

Capacitor already compiles the .jar files that are on the right place, so what that gradle file does is not really needed, what you can do is to delete the content of `node_modules/cordova-plugin-extension/src/android/rjfun-libs.gradle` as workaround.

### 2. AndroidX migration

Make sure you have following in your `android/app/gradle.properties`&#x20;

```
android.useAndroidX=true
android.enableJetifier=true
```

Also, install `cordova-plugin-androidx-adapter` and sync the project again.&#x20;

At times, you might also need to run a Refactor/ `Migrate to AndroidX` option from Android Studio.

### 3. Didn't find class "android.support.design.widget.CoordinatorLayout" after AndroidX migration

This indicates that there are some references of the old imports left in your files.&#x20;

Just replace `android.support.design.widget.CoordinatorLayout` with `androidx.coordinatorlayout.widget.CoordinatorLayout` . Do similar operation if it is any other library


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://enappd.gitbook.io/capacitor-full-app-ionic-angular/extra/troubleshooting.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
