R
R
Roman2019-08-22 07:16:57
Apache Cordova
Roman, 2019-08-22 07:16:57

Is it possible in Android Studio to build an APK from a Cordova project that will run on both API 10-15 and API 28?

The crux of the matter is that Cordova 8 allows you to create APKs starting from Android 4.4 (API 19) and not earlier. To create under earlier versions - you need to raise the previous version of Cordova.
But a Cordova project can also be imported into Android Studio, and the APK can be built directly in Android Studio.
Can such an imported project be merged into an APK that bypasses Cordova's limitation and runs on any version of Android?
Or am I driving? ))
If it is possible, then how exactly? Just change defaultMinSdkVersion?
If I drive - then also - why?)) I study the question - I want to understand.
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman, 2019-08-22
@procode

The answer, oddly enough, was found in the documentation: DD
https://developer.android.com/studio/build/manifes...
that is, we are correct (I decided to try to reduce the minimum API 19 to 14 - I think this is enough)
file
code
and
file
the code

<manifest android:hardwareAccelerated="true" android:versionCode="10101" android:versionName="1.1.1" package="com.your.site" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">
<uses-sdk tools:overrideLibrary="org.apache.cordova"/>

this is after editing.
As a result, everything went astray, and on a tablet under Android 4.2.2, a project created in Cordova 8 was launched. Not without visual glitches))) but it got up and running.
Hurrah Hurrah

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question