meteor / cordova-plugin-meteor-webapp

Cordova plugin that serves a Meteor web app through a local server and implements hot code push
MIT License
66 stars 74 forks source link

Read/write cdvasset.manifest from/to correct assets directory. #71

Closed benjamn closed 5 years ago

benjamn commented 5 years ago

After updating to cordova-android@7.1.4 (from 6.4.0) I started seeing the following error when running meteor run android:

MeteorWebApp: Could not load asset manager cache
MeteorWebApp: java.io.FileNotFoundException: cdvasset.manifest

Since anyone trying to write the cdvasset.manifest file probably also needs to invoke the rather uniquely-named cdvCreateAssetManifest task (see the file changed by this PR, build-extras.gradle), I googled that, and eventually came across this build-extras.gradle file from another Cordova plugin project.

These files are almost the same, except for the way inAssetsDir is defined, and the comment about supporting cordova-android <7.0.0 was another tip-off that I should try using file("src/main/assets") instead of just file("assets").

Although I can't claim I understand every detail of what's happening here, the new code falls back to doing what it did before when src/main/assets does not exist, so I think it's a relatively conservative change.