agamemnus / cordova-plugin-xapkreader

Easily access Google Play APK expansion file data.
32 stars 55 forks source link

Build Issue " unknown property cdvCompileSdkVersion" #129

Open Jason6Ping opened 5 years ago

Jason6Ping commented 5 years ago

Hi, I met build issue after I install the plugin, the error is:

"Could not get unknown property 'cdvCompileSdkVersion' for object of type com.android.build.gradle.LibraryExtension."

I just follow the steps mentioned in Adding an Android APK Expansion File to a Cordova Project and also downgraded the Cordova to 6.5.

Also, I have tried change the "build-extra.gradle" file in this plugin by modifying dependencies to "implementation project(':com.flyingsoftgames.xapkreader:library')" but I still get same error.

Does anyone have idea on this? Thanks.

mv83 commented 5 years ago

I have the same problem...

pomcanysdev commented 5 years ago

Hey, Any news on this or were you able to solve it? I'm getting the same error.

stihlsicher commented 5 years ago

Hi,

four months after the last request I ran into the same issue... Is there any information about solving this error? I already took a look at the other build issues but non of these seems to fix this problem...

agamemnus commented 5 years ago

In the fork timeline, a few people forked to 8.0. Check if that solves your issue.

stihlsicher commented 5 years ago

In the fork timeline, a few people forked to 8.0. Check if that solves your issue.

Is there an easier way to find than checking all forks? Sorry, I am not the firm with github...

agamemnus commented 5 years ago

Yes, there's a timeline somewhere, although when I checked just now it was gone, or maybe I checked in the wrong place.

In any event, I did incidentally look at the forks earlier yesterday, so here's one to try: https://github.com/devtobo/cordova-plugin-xapkreader

Let me know how it goes!

stihlsicher commented 5 years ago

First of all: thanks a lot for your support and linking to the version.

I have tried different combinations of cordova-android and the plugin. Due to some building errors ("Execution failed for task ':app:mergeDebugAssets'.

unable to create new native thread") that occured randomly I just recreated my complete app using the newest version of all tools. I suppose these errors were releated to adding and removing different android- platform versions.

my steps:


 😞 
As far as I get from cordova documentation cdvCompileSdkVersion is a build wide variable that should be available? Has anyone further ideas?
erobertson42 commented 4 years ago

This issue seems to stem from Cordova using an outdated plugin-build.gradle file, which is used to generate the final plugin build.gradle configs. If anyone is still having a problem with this, I was able to fix it using a before_plugin_install hook script. See here: https://github.com/erobertson42/cordova-plugin-xapkreader/blob/cordova-9/scripts/before_install.js

I'm also doing a couple other things in this script unrelated to this issue, so if they don't apply to you, just remove lines 11-15.