Closed t-ricci-enhancers closed 5 years ago
:(
@agamemnus do you know how to fix it? I can't deploy my cordova app on Android if the APK it's more than 100MB
@agamemnus do you think that with an earlier version of the JDK, gradle, android build tools and cordova-android it could build correctly?
Probably.
Project :com.flyingsoftgames.xapkreader:downloader_library declares a dependency from configuration 'releaseCompile' to configuration 'release' which is not declared in the descriptor for project :com.flyingsoftgames.xapkreader:library.
Just need to do this and it should work, whatever it means.
@agamemnus I'm a total noob with Java/Android native development and Gradle configurations, I don't really know what should be filled in it.
@agamemnus do you remember which versions of the JDK, Android Tools and/or Android Studio, cordova-android and gradle did you use the last time that you compiled successfully the plugin?
It's a real shame that this is the only plugin for cordova which supports Expansion APKs and that if it can't build correctly no one is able to make cordova apps larger than 100MB on Android :/
The number of problems keep piling up but I don't have the time/inclination to test/fix them all, unfortunately.
I don't use Android Studio; it was straight up Cordova... been a while.
Please check this out and see if it solves the problem: https://stackoverflow.com/questions/47023068/unable-to-run-ionic-app-after-update-to-android-studio-3-0
@agamemnus I managed to get it to compile/build using previous versions of the build tools. I'm going to specify what I did here (I didn't change the plugin code or configuration, just the build environment).
I made myself a x86_64 Xubuntu 18.04.1 VirtualBox's VM, here's the cordova info
output:
Node version: v10.8.0
Cordova version: 6.5.0
Config.xml file:
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.swan98.app" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Swan 98</name>
<description>
Swan 98 app
</description>
<author email="ale@enhancers.it" href="www.enhancers.it">
Enhancers srl
</author>
<content src="index.html" />
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<platform name="android">
<allow-intent href="market:*" />
<icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
<icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
<icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
<icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
<icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
<icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
<splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
<splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
<splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
<splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
<splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
<splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
<splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
<splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
<splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
<splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
<splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
<splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
<feature name="CDVWKWebViewEngine">
<param name="ios-package" value="CDVWKWebViewEngine" />
</feature>
<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
<preference name="AllowInlineMediaPlayback" value="true" />
<icon height="57" src="resources/ios/icon/icon.png" width="57" />
<icon height="114" src="resources/ios/icon/icon@2x.png" width="114" />
<icon height="40" src="resources/ios/icon/icon-40.png" width="40" />
<icon height="80" src="resources/ios/icon/icon-40@2x.png" width="80" />
<icon height="120" src="resources/ios/icon/icon-40@3x.png" width="120" />
<icon height="50" src="resources/ios/icon/icon-50.png" width="50" />
<icon height="100" src="resources/ios/icon/icon-50@2x.png" width="100" />
<icon height="60" src="resources/ios/icon/icon-60.png" width="60" />
<icon height="120" src="resources/ios/icon/icon-60@2x.png" width="120" />
<icon height="180" src="resources/ios/icon/icon-60@3x.png" width="180" />
<icon height="72" src="resources/ios/icon/icon-72.png" width="72" />
<icon height="144" src="resources/ios/icon/icon-72@2x.png" width="144" />
<icon height="76" src="resources/ios/icon/icon-76.png" width="76" />
<icon height="152" src="resources/ios/icon/icon-76@2x.png" width="152" />
<icon height="167" src="resources/ios/icon/icon-83.5@2x.png" width="167" />
<icon height="29" src="resources/ios/icon/icon-small.png" width="29" />
<icon height="58" src="resources/ios/icon/icon-small@2x.png" width="58" />
<icon height="87" src="resources/ios/icon/icon-small@3x.png" width="87" />
<icon height="1024" src="resources/ios/icon/icon-1024.png" width="1024" />
<splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" />
<splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
<splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
<splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" />
<splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" />
<splash height="2048" src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" />
<splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" />
<splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" />
<splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" />
<splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
<splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" />
<splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
<splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" />
</platform>
<preference name="Orientation" value="landscape" />
<preference name="DisallowOverscroll" value="true" />
<plugin name="cordova-plugin-whitelist" spec="^1.3.3" />
<plugin name="cordova-plugin-ionic-webview" spec="^2.0.1" />
<engine name="ios" spec="~4.3.1" />
<engine name="android" spec="~6.1.1" />
<plugin name="com.flyingsoftgames.xapkreader" spec="https://github.com/agamemnus/cordova-plugin-xapkreader.git#cordova-6.5.0">
<variable name="XAPK_EXPANSION_AUTHORITY" value="$PACKAGE_NAME" />
<variable name="XAPK_PUBLIC_KEY" value="YOUR_GOOGLE_PLAY_LICENSE_KEY" />
<variable name="XAPK_TEXT_DL_ASSETS" value="Downloading assets…" />
<variable name="XAPK_TEXT_PR_ASSETS" value="Preparing assets…" />
<variable name="XAPK_TEXT_DL_FAILED" value="Download failed." />
<variable name="XAPK_TEXT_ERROR" value="Error." />
<variable name="XAPK_TEXT_CLOSE" value="Close." />
<variable name="XAPK_MAIN_VERSION" value="0" />
<variable name="XAPK_PATCH_VERSION" value="0" />
<variable name="XAPK_MAIN_FILESIZE" value="0" />
<variable name="XAPK_PATCH_FILESIZE" value="0" />
<variable name="XAPK_AUTO_DOWNLOAD" value="true" />
<variable name="XAPK_AUTO_PERMISSION" value="false" />
<variable name="XAPK_AUTO_RELOAD" value="false" />
<variable name="XAPK_PROGRESS_FORMAT" value="percent" />
</plugin>
</widget>
Plugins:
com.flyingsoftgames.xapkreader,cordova-plugin-ionic-webview,cordova-plugin-whitelist
Android platform:
*************************************************************************
The "android" command is deprecated.
For manual SDK, AVD, and project management, please use Android Studio.
For command-line tools, use tools/bin/sdkmanager and tools/bin/avdmanager
*************************************************************************
Running /home/enhancers/Android/Sdk/tools/bin/avdmanager list target
Loading local repository...
[========= ] 25% Loading local repository...
[========= ] 25% Fetch remote repository...
[========= ] 25% Fetch remote repository...
[========= ] 25% Fetch remote repository...
[=======================================] 100% Fetch remote repository...
Available Android targets:
----------
id: 1 or "android-14"
Name: Android API 14
Type: Platform
API level: 14
Revision: 4
----------
id: 2 or "android-15"
Name: Android API 15
Type: Platform
API level: 15
Revision: 5
----------
id: 3 or "android-16"
Name: Android API 16
Type: Platform
API level: 16
Revision: 5
----------
id: 4 or "android-17"
Name: Android API 17
Type: Platform
API level: 17
Revision: 3
----------
id: 5 or "android-19"
Name: Android API 19
Type: Platform
API level: 19
Revision: 4
----------
id: 6 or "android-21"
Name: Android API 21
Type: Platform
API level: 21
Revision: 2
----------
id: 7 or "android-22"
Name: Android API 22
Type: Platform
API level: 22
Revision: 2
----------
id: 8 or "android-23"
Name: Android API 23
Type: Platform
API level: 23
Revision: 3
----------
id: 9 or "android-24"
Name: Android API 24
Type: Platform
API level: 24
Revision: 2
----------
id: 10 or "android-25"
Name: Android API 25
Type: Platform
API level: 25
Revision: 3
----------
id: 11 or "android-26"
Name: Android API 26
Type: Platform
API level: 26
Revision: 2
----------
id: 12 or "android-27"
Name: Android API 27
Type: Platform
API level: 27
Revision: 3
----------
id: 13 or "android-28"
Name: Android API 28
Type: Platform
API level: 28
Revision: 4
Error retrieving iOS platform information: Error: xcodebuild: Command failed with exit code ENOENT
I think the important part was using cordova-cli@6.5.0 and cordova-android@6.1.1, I'm using the sdk and build tools from Android Studio version 3.1.3 and JDK 1.8.0_181
Also I used this fix from SO to fix an error: https://stackoverflow.com/a/42639125 => https://stackoverflow.com/a/41177145/4941585
Now I just need to try and configure+use the plugin to get my expansion APK to wok
Using cordova-android@6.4.0 and https://github.com/agamemnus/cordova-plugin-xapkreader.git\#cordova-6.5.0
cordova info
:cordova build android --release
Error: