Android Apk Package

General discussion on Zend Studio

Android Apk Package

Postby anto7516 on Wed Nov 18, 2015 8:26 pm

Hello, I exported from ZS13 the .apk package, when I try to install my test application on my phone with Android version 4.4.2. I get an error of not installed. ZS exports the package Android 5.0.1 (API 21). I also installed with the Android SDK Manager version Android 4.4.2 (API 19). I think the failure to install on my phone is caused by different version. How can I set ZS default compile the .apk file with Android version 4.4.2 (API 21).

thanks, Antonino
Attachments
img.jpg
img.jpg (88.29 KiB) Viewed 2768 times
anto7516
 
Posts: 49
Joined: Tue Dec 02, 2014 10:37 pm

Re: Android Apk Package

Postby kaloyan_r on Fri Nov 20, 2015 3:15 pm

It seems that the target API level is determined by the version of the Cordova engine you configured for your project. I assume you use the latest version of the Cordova engine - 4.1.1. Try using an older version like 3.6.4.

You need to download the engine in the Hybrid Mobile > Engines preference page.

Then you need to configure you project to use this version of Cordova:
1. Open the config.xml file.
2. Edit this line (change to version 3.6.4):
Code: Select all
<engine name="android" version="4.1.1" />
3. Save.
4. Try to export again.
Kaloyan Raev
Zend Studio Team
User avatar
kaloyan_r
Zend Product Manager
 
Posts: 582
Joined: Thu May 23, 2013 12:40 pm

Re: Android Apk Package

Postby anto7516 on Sun Nov 22, 2015 1:30 pm

I changed engine Cordova and export version of Android apk files I want.
Now I have to figure out how to install the apk in my phone and try application without putting on play store.
I copied apk file in the SD card in my phone and run, but not installed application. I downloaded to play store Root Browser views to system files, when I try to copy the apk package in the /System/App.
I get the following error: Operation Failed.
It helps me to understand a little how to test application by phone.

Thanks, Anthony

ps. when text application with CordovaSim end Android emulator everything works,
I deploy application (Apigility) in the cloud server with Ubuntu 14 where I also installed Zend Server 8 and everything works.
anto7516
 
Posts: 49
Joined: Tue Dec 02, 2014 10:37 pm

Re: Android Apk Package

Postby kaloyan_r on Mon Nov 23, 2015 8:55 am

Good progress :-)

Now, testing on a real phone. There are two possible approaches:
1. Testing directly from the IDE if you have a device connected via USB.
2. Exporting the APK and installing it on the device.

The first one should be easier:
1. Follow the instructions on this page to prepare you phone and computer: http://developer.android.com/tools/device.html
2. Connect your phone to the computer via USB.
3. Use Run As > Run on Android Device from Zend Studio.

The second approach is more complex:
1. Export the APK like you have done. It is exported in release mode, but not signed.
2. Sign the APK manually as described here: http://developer.android.com/tools/publ ... g-manually
3. Enable the "Unknown source" option in the Security settings on your phone.
4. Copy and install the APK on the phone.
Kaloyan Raev
Zend Studio Team
User avatar
kaloyan_r
Zend Product Manager
 
Posts: 582
Joined: Thu May 23, 2013 12:40 pm

Re: Android Apk Package

Postby anto7516 on Mon Nov 23, 2015 9:51 pm

I testing directly from the IDE device connected via USB, but ZS get the following error.
I enabled debugging on phone from developer options.
I do not understand what's missing.
Attach image configuration SDK extras (Google USB Installed)
thanks, Antonino
Attachments
img02.jpg
img02.jpg (52.99 KiB) Viewed 2648 times
img01.jpg
img01.jpg (21.51 KiB) Viewed 2648 times
anto7516
 
Posts: 49
Joined: Tue Dec 02, 2014 10:37 pm

Re: Android Apk Package

Postby kaloyan_r on Tue Nov 24, 2015 7:11 am

I think the Google USB Driver works only for Google Nexus devices. What is the exact model of your phone?

Please check carefully this page: http://developer.android.com/tools/extras/oem-usb.html
At the bottom there is a table with links to the correct USB driver for each device. Make sure you have installed the correct one.

You can also check with the "adb devices" command if Windows recognizes that your phone is plugged in.
Kaloyan Raev
Zend Studio Team
User avatar
kaloyan_r
Zend Product Manager
 
Posts: 582
Joined: Thu May 23, 2013 12:40 pm

Re: Android Apk Package

Postby anto7516 on Thu Nov 26, 2015 8:05 pm

After your valuable advice I could: Install Android USB drives, Run on Android Device application from Zend Studio, sign and install apk file correctly. Everything works.

thank you very much, Antonino
anto7516
 
Posts: 49
Joined: Tue Dec 02, 2014 10:37 pm

Re: Android Apk Package

Postby jame5665 on Mon Nov 20, 2017 9:17 pm

Doesn't seem to be an issue with the apk package instead the Cordova engine. Based on your project type I suggest you installing an older version of it to test the application.
jame5665
 
Posts: 1
Joined: Mon Nov 20, 2017 9:13 pm


Return to Zend Studio

Who is online

Users browsing this forum: No registered users and 9 guests