I have developed an hybrid app using ionic 2,now I want to publish my app on play store. But the issue is that the size of my apk is 124MB, as it contains music files(95MB).
Can anyone suggest how to make use of expansion file in ionic 2?
This might help:
Another suggestion would be to have a post load event that downloads the music on the first run.
i am trying to install xapkreader plugin as:
cordova plugin add https://github.com/agamemnus/cordova-plugin-xapkreader.git
but i am getting error. below is my npm-debug.log
0 info it worked if it ends with ok
1 verbose cli [ ‘C:\Program Files\nodejs\node.exe’,
1 verbose cli ‘C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js’,
1 verbose cli ‘install’,
1 verbose cli ‘https://github.com/agamemnus/cordova-plugin-xapkreader.git’,
1 verbose cli ‘–save’ ]
2 info using npm@3.10.10
3 info using node@v6.10.0
4 silly loadCurrentTree Starting
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 silly fetchPackageMetaData https://github.com/agamemnus/cordova-plugin-xapkreader.git
8 silly fetchOtherPackageData https://github.com/agamemnus/cordova-plugin-xapkreader.git
9 silly cache add args [ ‘https://github.com/agamemnus/cordova-plugin-xapkreader.git’,
9 silly cache add null ]
10 verbose cache add spec https://github.com/agamemnus/cordova-plugin-xapkreader.git
11 silly cache add parsed spec Result {
11 silly cache add raw: ‘https://github.com/agamemnus/cordova-plugin-xapkreader.git’,
11 silly cache add scope: null,
11 silly cache add escapedName: null,
11 silly cache add name: null,
11 silly cache add rawSpec: ‘https://github.com/agamemnus/cordova-plugin-xapkreader.git’,
11 silly cache add spec: ‘git+https://github.com/agamemnus/cordova-plugin-xapkreader.git’,
11 silly cache add type: ‘hosted’,
11 silly cache add hosted:
11 silly cache add { type: ‘github’,
11 silly cache add ssh: ‘git@github.com:agamemnus/cordova-plugin-xapkreader.git’,
11 silly cache add sshUrl: ‘git+ssh://git@github.com/agamemnus/cordova-plugin-xapkreader.git’,
11 silly cache add httpsUrl: ‘git+https://github.com/agamemnus/cordova-plugin-xapkreader.git’,
11 silly cache add gitUrl: ‘git://github.com/agamemnus/cordova-plugin-xapkreader.git’,
11 silly cache add shortcut: ‘github:agamemnus/cordova-plugin-xapkreader’,
11 silly cache add directUrl: ‘https://raw.githubusercontent.com/agamemnus/cordova-plugin-xapkreader/master/package.json’ } }
12 verbose addRemoteGit caching https://github.com/agamemnus/cordova-plugin-xapkreader.git
13 verbose addRemoteGit git+https://github.com/agamemnus/cordova-plugin-xapkreader.git is a repository hosted by github
14 silly tryClone cloning git+https://github.com/agamemnus/cordova-plugin-xapkreader.git via git+https://github.com/agamemnus/cordova-plugin-xapkreader.git
15 verbose tryClone git-https-github-com-agamemnus-cordova-plugin-xapkreader-git-2d68b1d4 not in flight; caching
16 verbose correctMkdir C:\Users\intersoft-admin\AppData\Roaming\npm-cache_git-remotes correctMkdir not in flight; initializing
17 info git [ ‘config’, ‘–get’, ‘remote.origin.url’ ]
18 silly validateExistingRemote git+https://github.com/agamemnus/cordova-plugin-xapkreader.git remote.origin.url: https://github.com/agamemnus/cordova-plugin-xapkreader.git
19 verbose validateExistingRemote git+https://github.com/agamemnus/cordova-plugin-xapkreader.git is updating existing cached remote C:\Users\intersoft-admin\AppData\Roaming\npm-cache_git-remotes\git-https-github-com-agamemnus-cordova-plugin-xapkreader-git-2d68b1d4
20 info git [ ‘fetch’, ‘-a’, ‘origin’ ]
21 verbose updateRemote git fetch -a origin (https://github.com/agamemnus/cordova-plugin-xapkreader.git)
22 verbose setPermissions git+https://github.com/agamemnus/cordova-plugin-xapkreader.git skipping chownr on Windows
23 verbose resolveHead git+https://github.com/agamemnus/cordova-plugin-xapkreader.git original treeish: master
24 info git [ ‘rev-list’, ‘-n1’, ‘master’ ]
25 silly resolveHead git+https://github.com/agamemnus/cordova-plugin-xapkreader.git resolved treeish: 902f679f4b55fda0002340e93e469c222abfce6f
26 verbose resolveHead git+https://github.com/agamemnus/cordova-plugin-xapkreader.git resolved Git URL: git+https://github.com/agamemnus/cordova-plugin-xapkreader.git#902f679f4b55fda0002340e93e469c222abfce6f
27 silly resolveHead Git working directory: C:\Users\INTERS~2\AppData\Local\Temp\npm-9180-dadd3e71\git-cache-dfbbfe5f\902f679f4b55fda0002340e93e469c222abfce6f
28 info git [ ‘clone’,
28 info git ‘C:\Users\intersoft-admin\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-agamemnus-cordova-plugin-xapkreader-git-2d68b1d4’,
28 info git ‘C:\Users\INTERS~2\AppData\Local\Temp\npm-9180-dadd3e71\git-cache-dfbbfe5f\902f679f4b55fda0002340e93e469c222abfce6f’ ]
29 verbose cloneResolved git+https://github.com/agamemnus/cordova-plugin-xapkreader.git clone Cloning into ‘C:\Users\INTERS~2\AppData\Local\Temp\npm-9180-dadd3e71\git-cache-dfbbfe5f\902f679f4b55fda0002340e93e469c222abfce6f’…
29 verbose cloneResolved done.
30 info git [ ‘checkout’, ‘902f679f4b55fda0002340e93e469c222abfce6f’ ]
31 verbose checkoutTreeish git+https://github.com/agamemnus/cordova-plugin-xapkreader.git checkout Note: checking out ‘902f679f4b55fda0002340e93e469c222abfce6f’.
31 verbose checkoutTreeish
31 verbose checkoutTreeish You are in ‘detached HEAD’ state. You can look around, make experimental
31 verbose checkoutTreeish changes and commit them, and you can discard any commits you make in this
31 verbose checkoutTreeish state without impacting any branches by performing another checkout.
31 verbose checkoutTreeish
31 verbose checkoutTreeish If you want to create a new branch to retain commits you create, you may
31 verbose checkoutTreeish do so (now or later) by using -b with the checkout command again. Example:
31 verbose checkoutTreeish
31 verbose checkoutTreeish git checkout -b
31 verbose checkoutTreeish
31 verbose checkoutTreeish HEAD is now at 902f679… Update README.md
32 info git [ ‘submodule’, ‘-q’, ‘update’, ‘–init’, ‘–recursive’ ]
33 verbose updateSubmodules git+https://github.com/agamemnus/cordova-plugin-xapkreader.git submodule update
34 error addLocal Could not install C:\Users\INTERS~2\AppData\Local\Temp\npm-9180-dadd3e71\git-cache-dfbbfe5f\902f679f4b55fda0002340e93e469c222abfce6f
35 silly fetchPackageMetaData Error: EISDIR: illegal operation on a directory, read
35 silly fetchPackageMetaData at Error (native)
35 silly fetchPackageMetaData error for https://github.com/agamemnus/cordova-plugin-xapkreader.git { Error: EISDIR: illegal operation on a directory, read
35 silly fetchPackageMetaData at Error (native) errno: -4068, code: ‘EISDIR’, syscall: ‘read’ }
36 silly rollbackFailedOptional Starting
37 silly rollbackFailedOptional Finishing
38 silly runTopLevelLifecycles Finishing
39 silly install printInstalled
40 verbose stack Error: EISDIR: illegal operation on a directory, read
40 verbose stack at Error (native)
41 verbose cwd D:\xampp\htdocs\ionic2\MyIonic2Project\node_modules
42 error Windows_NT 6.3.9600
43 error argv “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js” “install” “https://github.com/agamemnus/cordova-plugin-xapkreader.git” "–save"
44 error node v6.10.0
45 error npm v3.10.10
46 error code EISDIR
47 error errno -4068
48 error syscall read
49 error eisdir EISDIR: illegal operation on a directory, read
50 error eisdir This is most likely not a problem with npm itself
50 error eisdir and is related to npm not being able to find a package.json in
50 error eisdir a package you are trying to install.
51 verbose exit [ -4068, true ]
please help me solving this. my cordova version is 7.0.1 and ionic version is 3.10.3
Still think you could have a post-operation that downloads the content.
Like if you only change the content you don’t need to download the app again.
Likewise if you upgrade the app you don’t need a 100MB+ download.
@Judgewest2000 your way is also good but , i have uploaded ios version of my app on app store and want android app to be consistent with the “ios” version.
Consistently annoying user experience.
I would whole heartedly say you should split it up, including for your iOS folks.
you mean i should download all music files in ios and android , when app runs for the first time?
it is requirement to automatically download the music files from play store , along with app. Can’t we do this using expansion files?
Hi this makes sense. Would you suggest putting a folder on a database and downloading when the app launches
Whatever works. Put your stuff into a dB or web server or whatever. Just not in the initial payload.