Capacitor 3.6 or higher for Android 8.1 #7991
Replies: 1 comment
-
My problem is solved. I had a mistake in my thinking regarding the target SDK, compilation SDK, and min SDK declarations in the Android directory. If the min SDK is supported for Capacitor/Gradle, I can use the API level without any problems. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
My question is which version of Capacitor should be used for Android 8.1 and how exactly do I use it? Older versions of Capacitor still contain Cordova plugins, which I don't need. Instead, I need help creating my APK for this Android version.
Android 8.1 OREO (API-Level 27)
Ionic CLI 7.2.1
Ionic Framework 8.5.5
Angular CLI 19.2.9
NodeJs v22.14.0
I have created a new Ionic project and would like to create an APK with Capacitor for Android version 8.1 Oreo without Android Studio. To do this,
gradlew assembleDebug
would need to be executed in the Android folder.Since the app requires an older Android version, I chose Capacitor version 3.6 with Gradle 7.6 and manually configured the API level and plugin settings (
com.android.tools.build:gradle:4.2.2
,com.google.gms:google-services:4.3.15
) and provided the Android SDK via local.properties. But when I run it, I always get an error saying that Cordova Framework 7.0.0 could not be found.So I tried deleting the Cordova part, i.e. the folder
capacitor-cordova-android-plugins
, and removing the references, but it still tells me that I need the framework. Perhaps this is because the references are still contained innode_modules
, or perhaps I did not remove all references.Then I tried to achieve this with a local Cordova Framework 7.0.0, using a .jar file that I extracted from the .aar. Unfortunately, this does not seem to work either. I deleted the CordovaAndroidVersion variable in
ext
in thebuild.gradle
file in the plugins folder, linked the variable to the local directory, and removed the references to maven. None of that worked, so I wanted to ask how to fix this. In general, it should only be due to Capacitor and Cordova and not Ionic, Angular, or NodeJS, right? And editing the node_modules to remove the references there is not a nice solution either.Since everything is somehow interdependent and version-based for Android 8.1, it's quite complex to handle, but currently only the Cordova framework seems to be causing problems. Or should I use an older/newer version than 3.6 if I need Android 8.1?
Grettings
Beta Was this translation helpful? Give feedback.
All reactions