Fix cordova build error on cordova-android@7.0.0 #337
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request fixes cordova build error on cordova-android@7.0.0.
Because the project directory structure has been changed by cordova-android 7.0.0,
if
platforms/android/libs/
exists,the directory structure is not recognized as new style(*1) and an error occurs.
altbeacon.jar
should be copied toplatforms/android/app/libs/
instead of
platforms/android/libs/
.By using
<lib-file>
in plugin.xml,altbeacon.jar
is copied to the appropriate directory.(on cordova-android 7.0.0 and <=6.x)
(*1)
https://github.com/apache/cordova-android/blob/a7304b9a19a7b7f760d1bba240648a35130b295a/bin/templates/cordova/lib/AndroidStudio.js
Other approach
get altbeacon library from maven repository
deton@d3488b6
Steps to reproduce the error
Or add other plugin after
cordova plugin add cordova-plugin-ibeacon
.(no problem on cordova-android@6.4.0)
System info