Open chancezeus opened 5 years ago
Found the fix for the folder structure issue too according to the docs (see https://cordova.apache.org/docs/en/6.x/plugin_ref/spec.html#config-file) you can use a *
as a wildcard and it will search the entire directory until it finds a matching file so instead of <config-file target="res/values/xapkreader.xml" parent="/*">
you should use <config-file target="*/values/xapkreader.xml" parent="/*">
Thanks for these helpful tips.
You're welcome, I find it interesting that google removed (or at least "blacklisted") the entire org.apache.http
module, but never updated their own apk expansion (related) libraries. My first step towards fixing it was replacing the provided libraries with the newest (locally installed) versions, but that too was complaining about the missing org.apache.http
imports.
It's definitely interesting...
I ran into various compile issues (undefined properties, missing "org.apache.http", etc) when trying to compile an android project with cordova-android version 7.1.1. Looking to solve some of the problems I googled around and found this github repo: https://github.com/danikula/Google-Play-Expansion-File. Since most of the problems originated from the expansion libraries I decided to try and resolve at least that part by using these pre-compiled versions.
Simply put: Step 1: create a
build-xapkreader.gradle
with the following contentStep 2: replace the following
with
Et voila: the app compiles
The last remaining issue is a folder structure issue, namely the
res/values/xapkreader.xml
has moved from theplatforms/android
folder into theplatforms/android/app/src/main
folder, leading to some warnings during plugin install because it cannot update the preferences properly. The only solution I can think of for this issue is using a hook instead defining these updates in config.xml, but I leave that till a later moment.For now I suggest at least removing the uncompiled versions of the downloader and licensing libraries and using either the provided solution or compile them yourself and provide the resulting aar file(s) with the plugin (please PM if you need info on howto add "local" aar files, did that for a different custom plugin too).