Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Issue " unknown property cdvCompileSdkVersion" #129

Open
Jason6Ping opened this issue Jul 4, 2018 · 8 comments
Open

Build Issue " unknown property cdvCompileSdkVersion" #129

Jason6Ping opened this issue Jul 4, 2018 · 8 comments

Comments

@Jason6Ping
Copy link

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
Copy link

mv83 commented Jul 5, 2018

I have the same problem...

@pomcanysdev
Copy link

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

@stihlsicher
Copy link

stihlsicher commented Feb 15, 2019

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
Copy link
Owner

agamemnus commented Feb 15, 2019 via email

@stihlsicher
Copy link

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
Copy link
Owner

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
Copy link

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:

  • create new project
  • add all plugins (incl. the linked version of xapkreader)
  • add platform android@latest (8.0.0)
  • build
    Build is terminated with error:
* Where:
Build file '/Users/jahn/appONE/app-v2/hamminkelnNew/platforms/android/com.flyingsoftgames.xapkreader/apphamminkeln-downloader_library/build.gradle' line: 45

* What went wrong:
A problem occurred evaluating project ':com.flyingsoftgames.xapkreader:downloader_library'.
> Could not get unknown property 'cdvCompileSdkVersion' for object of type com.android.build.gradle.LibraryExtension.

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

@erobertson42
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants