Software Archive
Read-only legacy content
17061 Discussions

Missing APK in Android build

Albert_R_
Beginner
587 Views

Hello,

after building my (Cordova & Crosswalk) application for Android I can't find the two APKs in the downloaded ZIP-file. In the zip there are only three directories ("assets", "META-INF" and "res") and some other files, but no *.apk...

The build log doesn't show any errors or warnings and the downloading works perfectly. Everything worked fine with a previous version of the XDK several weeks ago, but because it is now deprecated I switched to v3491 - don't know if that matters.

Where can I find the APKs?

Thanks for any help!

0 Kudos
7 Replies
PaulF_IntelCorp
Employee
587 Views

Regardless of the version of the XDK you are using, the build system is the same. I just did a test build with the "hello cordova" sample configured as a Crosswalk app. Inside the ZIP file were two APK files. I've attached the ZIP file for your inspection. If you continue to see this issue, please post a downloaded ZIP file to the thread (using the "Attach Files to Post" link below the edit window) so we can take a closer look.

0 Kudos
Albert_R_
Beginner
587 Views

Hi Paul,

thanks for your quick reply!

I tried to build the hello-cordova sample app, too, and I don't have any problems with the build there. Everything works as expected. Therefore it is most certainly a matter with my project... I compared the build settings of both apps, the sample one and my own, but I can't find any major differences which could cause the build process to fail.

I attached a trimmed version of the ZIP file I get after every build, as you asked me to. In assets/www/ were all my project files (html, css, js,...) and in res were several folders only containing the launch icons and splashscreens.

It would be great if you could have a look at it and suggest a possible solution for my problem. Thanks a lot!

0 Kudos
PaulF_IntelCorp
Employee
587 Views

Albert -- what you sent me is actually an APK file (an APK file and an IPA, etc.) is a ZIP file. The apps you create are actually "packages" that contain a collection of files, not just a single executable, like the EXE on a Windows machine.

So what appears to be happening is the APK you are building is getting named as a ZIP file. If you rename the extension to APK does it install and run?

I suspect you chose the "shared Crosswalk" library option in your build settings? There were some changes made recently to the build system that, I believe, impacted that part of the build, and this may be a result of that. I'll try to do a quick test myself, to confirm. If that's not it, I'm not sure what would be causing this, but I suspect if you rename the file extension to APK it will work.

0 Kudos
PaulF_IntelCorp
Employee
587 Views

Albert -- when I do a test I get two APK files inside of a ZIP, when I choose the "Crosswalk shared lib" and I get a single APK file when I deselect the "optimize for Crosswalk" checkbox.

I suspect you have "optimize for Crosswalk" turned off and are using Windows and your "show file extensions" in the Windows File Explorer is turned off (which is the default for many Windows systems), which means you cannot see if the file ends in an APK or ZIP file. You may have an unzip tool installed on your Windows machine that is then showing an APK as an "archive" or "zip" file type in File Explorer and that is why you are opening the file and finding the contents of an APK file inside. As I mentioned earlier, an APK is a ZIP file. Here's where you set viewing of file extensions in Windows 10 File Explorer:

extensions-on.png

0 Kudos
Albert_R_
Beginner
587 Views

Hi Paul,

the renaming did really work! Thank you for your assistance!

I'm still a bit curious on why the downloaded file was a ZIP in the first place. I chose the "embedded crosswalk" lib (not the shared one) and also checked "optimize for crosswalk". I do work on a Windows machine, but I already had the file name extension enabled from the beginning and every time I download a build (with the mentioned settings) I get a ZIP.

Anyway, thanks again!

0 Kudos
PaulF_IntelCorp
Employee
587 Views

Albert -- if you have "optimize for crosswalk" checked AND you chose "embedded crosswalk" you should get a ZIP that contains two APK files (names nearly identical, one with x86 in the name and one with ARM in the name). So this still does not make sense. Can you send my your intelxdk.config.additions.xml file? You might have something in there that is overriding the build settings and causing this to happen. Just attach it to your post using the "Attach Files to Post" link below the edit window.

0 Kudos
Albert_R_
Beginner
587 Views

I can't attach the intelxdk.config.additions.xml because the file extension is not allowed. You can find it undernaeth.

The required splashscreen plugin is installed.

 

<access origin="*" />
<preference name="DisallowOverscroll" value="true" />
<preference name="exit-on-suspend" value="false" />
<preference name="HideKeyboardFormAccessoryBar" value="false" />

<platform name="ios">
    <!-- below requires the splash screen plugin -->
    <!-- docs: https://github.com/apache/cordova-plugin-splashscreen -->
    <preference name="AutoHideSplashScreen" value="true" />
    <preference name="FadeSplashScreen" value="false"/>
    <preference name="FadeSplashScreenDuration" value="2"/>
    <preference name="ShowSplashScreenSpinner" value="false"/>

	<feature name="InAppBrowser">
    	<param name="ios-package" value="CDVInAppBrowser" />
	</feature>

</platform>

<platform name="android">
    <!-- below requires the splash screen plugin -->
    <!-- docs: https://github.com/apache/cordova-plugin-splashscreen -->
    <preference name="SplashMaintainAspectRatio" value="false" />
</platform>

 

0 Kudos
Reply