Mobilefirst application apk file not installing in real devices - android

i am using mobilefirst platform for hybrid application development.
I created an application in and created .apk file of this application:
Generated Android project folder -> Android tools -> Export unassigned application
I then copied this apk file to android device and try to install this .apk file. At this time its showing Application not installed.
It's properly working in simulator and browser.
What is the issue here?

The problem you are facing is due to the fact that you have exported an unsigned application, which is not intended for distribution purposes.
Try Exporting a signed application package, by following one of the following steps :
"Right click project -> Export -> Export Android Application"
"Right click project -> Android Tools -> Export Signed Application Package"
Both of the above methods will export a signed application file, used for distribution purposes.
You may also test your app on a real device by just connecting your device to the testing machine via a USB cable and then following step below :
Right Click on your Project root -> Go to Run As -> Select Android Application -> Now a popup is shown with all the active devices -> Select your device from the list
**
Newbie Guide to Export Signed Application and configuring keystore file in Eclipse :
"Right click project -> Android Tools -> Export Signed Application Package"
A popup as shown below would appear, if your project won't contains any erros :
Click Next
On clicking Next, you'll get a screen as shown below :
5.On this screen, make sure Create new keystore is checked.
6.Browse to the location, you want to create a new keystore at, and also add a password to access it later.
7.Then Click Next
8.On clicking next you'll get a screen as shown below :
9.Fill all the fields in this screen, (ONLY first five are mandatory), In validity fill the number of years this key would be valid for, then click Next.
10.On clicking Next you'll get a screen as shown below :
11.Browse to the location you want to keep for apk file in, and Click Finish, and you are done!
Hope this helps!

Did you try with a Signed application package rather than an Unsigned application package?
It could be that in your device settings (under Security) you have not allowed to install applications from Unknown Sources.
Enable support for Unknown Sources
Try again with an unsigned package
When you select Run As > Run on Android device", the application gets signed with the debug keystore supplied by Android, so it's still a "signed" package.

Related

How do I create apk file for a Xamarin.Android application

I am new to android development and need to create an apk file for an android application I made in Xamarin Studios so my peer can test it on his device. How can I create the apk file?
For even simpler/faster testing, you can:
connect an Android phone to the USB and use it for debugging/testing.
See https://learn.microsoft.com/en-us/xamarin/android/get-started/installation/set-up-device-for-development.
build your app (as debug, for example)
Every time you test on your phone by clicking on the "play button" button example, it automatically creates an APK under bin\Debug\ or bin\Release.
The file you are looking for is the "Signed apk", e.g. com.companyname.MyApp-Signed.apk
Copy this file to the device using any method (I usually use USB or GDrive). On the device, download it and click on it to install.
Important:
"Use Shared Runtime" inside the project properties/Android Options must be Disabled, otherwise Mono Runtime won't be included and your app will crash on phones where Mono isn't installed.Example
Select Build menu next click Archive for Publishing
Right-Click on build which do you want get apk file next select Sign and Distribute
Select Ad Hock and click next button
Select testing certificate and click next button
Publish and choose where do you want save apk file.
With the latest Visual Studio 2019 and the latest xamarin, I will literally walk you through all the steps:
Change your project from "Debug" mode to "Release" mode like below:
Build your android project first.
Right-click on your android project -> click "Archive..."
It'll show something like this: Let it complete its processing
When it's done, click the "Distribute" button, it'll open a menu like this:
Click on the "Ad Hoc" button and click the "+" button like below:
fill the form and click the "Create" button
Select your saved settings and click the "Save As" button
Chose your location to save and save the APK file and get it from where you saved it :)
For simple testing:
Build the project in Release mode
Go to your project's /bin/Release folder
Inside the folder, you will find the required signed apk file.
The apk file should now be installable simply by running it from an Android device.

Android - Install signed apk via Eclipse

Good day.
I have an application and I recently wrote a code to make it update programatically by fetching the updated apk file on a server I host. I made the updated apk by changing the version code to version 2 and version name to 1.0.1 in the Android Manifest file. I also placed a textView in the first activity to know if it is the updated application or not. However, an issue I encountered while updating is that I get the An existing package by the same name with a conflicting signature is already installed error when Android tries to install the downloaded apk file. Since the error is about a conflicting signature, I guessed that whenever I install an application to my device (Nexus 7) from Eclipse, the application is not signed. What I did was that I Exported a signed copy of the version 1 of the application, moved it to my Nexus 7, and installed. From that signed application version, I tried to update and I encountered no problems.
However, this process is not efficient at all because if I want to debug my application to see if data stored like the database or sharedPreferences persist between app updates, what I'll have to do is to export my app, copy to tablet, then install. This does not allow me to use logCat efficiently - as the session filter won't work. The only way for me to see my logs is via the All Messages category and look for my tags.
So, my main question is: Is there a way to install a signed copy of your application via Eclipse so you can still debug efficiently via LogCat?
A secondary question: What happens to the private app data like the SQLite Database and the SharedPreferences when the application upgrades versions? Are they deleted?
When you debug (or run) Android will use the default store key for signing your application, and you can change it on Windows -> Preferences -> Android -> Build
Change your debug keystore there with custom debug keystore
Yes Its possible to install signed copy your application via Eclipse and you can still debug efficiently via LogCat.
Follow These steps.
1. Right click on your project from project list in eclipse.
2. Click Export.
3. Then select Export Android Application
4. Then select the project to export.
5. Click Next.
6. Then give the path of signing key (Keystore file). If you don't have any then create new keystore file by selecting Create new Keystore radio button on that Dialog.
7. Enter and confirm password and click Next.
8. Select Alias of Keystore file. which you have given while creating that file.
9. Enter password for that Alias and click Next.
10. Select the destination to export apk file and click finish.
It may take few minutes to build your app. Time depends on your application size.

Export signed app hangs

I have a problem with exporting signed application. I have done some updates on my application, so I export application like I did before.
Right click on project -> Android tools -> Export signed application.
When I get to final step (look at the picture on link below) I press Finish. Loading cursor is showed but application does not get exported. I have tried with new keystore too.
I already disabled Automatic builds.
What could be the cause?

How to convert from my android project to .apk file?

I am beginner in android. I am successfully created one application. In that application name is Hello. It's successfully running in My Emulator. My questions are How to convert that application to .apk files. Because how to i run this application(Hello) to my android tablet. If it is possible please send information for how to convert taht application to .apk format. Otherwise if it is not possible send Reason. Please reply your answers and comments are valuable me. Thanks.
Simply try below existing answers -
Export Android .apk
.Apk file From application
exporting-a-signed-android-package
Steps to Export an .apk
Right click your project -> Select Android tools -> Export Signed application package -> Next
Choose create new keystore -> set the new location using browse -> and give new name for key also
give the password & confirm the password also -> Next
Give alias name -> give new or old password & confirm the password also -> fill validity -> and below make one column to fill -> Next
set the .apk file's destination to existing location or new location -> Finish
Actually if you don't want to publish your app for now,and just want to get it working on your phone, then you just have to copy the yourApp.apk file from /workspace/yourProject/bin directory to your sdcard and then install it.
from eclipse
refer link
http://www.jetbrains.com/idea/webhelp/exporting-a-signed-android-package.html
http://developer.android.com/guide/publishing/app-signing.html
On the main menu, choose Tools | Android | Export Signed Android Package. The Export Signed Android Package Wizard starts.
from command line :
http://asantoso.wordpress.com/2009/09/15/how-to-build-android-application-package-apk-from-the-command-line-using-the-sdk-tools-continuously-integrated-using-cruisecontrol/
even it is also important to know about signing
http://developer.android.com/guide/publishing/app-signing.html
Rightclick your project in Eclipse -> Export -> Android -> Export Android Application -> Next -> Create new keystore -> Enter infos -> Follow remaining steps
Eclipse does that for you (if you are only looking ot test it on your device rather than actually create an .apk, which is what it sounds like you really want to do).
Simply plug in your device to your computer after you have installed the proper drivers for it and it should show up as a target if you go to Run -> Run Configurations, select your app and then click on the "Target" tab. Select the device and then you are set to run it on your device from Eclipse.

How to create apk file for android?

I wrote some android application using Eclipse.
I found apk file in the bin directory.
When i connect USB cable between the cell phone and the computer - the application is running.
But when i disconnect the USB cable from the cell phone - and i trying to launch the application from the cell phone i get message
"Waiting for debugger"
"Application ( process name .. ) is waiting for the debugger to attach"
So, How can i create apk ( installation file ) for using with no debug ?
If you like to release your app to the public, here you can find step by step info on how to do it.
Include how to create the apk file, from the link:
To create a signed and aligned .apk in Eclipse:
Select the project in the Package Explorer and select File > Export.
Open the Android folder, select Export Android Application, and click Next.
The Export Android Application wizard now starts, which will guide you through the process of signing your application, including steps for selecting the private key with which to sign the .apk (or creating a new keystore and private key).
Complete the Export Wizard and your application will be compiled, signed, aligned, and ready for distribution.
Is there a Debug.waitForDebugger() somewhere in your code?
Here are some tricks...
http://groups.google.com/group/android-developers/browse_thread/thread/bdf61367c8649f4a?pli=1
Seen some indication that there is a global debug flag in the phone that might have got stucked restarting the phone might help.
File - Export - Android Application
Android application package file (APK) is
program binary used to distribute and install
Android application onto the Android operating
system. Here we'll see step by step procedure
of creating .apk file ready to be installed in
Android device.
Tools & Technologies used in this article :
1. JDK 1.6
2. Eclipse 3.7
3. Android SDK
There are two ways to export Aplication
Package in Eclipse using Android Tools
1. Export Unsigned Application Package
2. Export Signed Application Package
Export Unsigned Application Package
Right click on the Android project (say
'AndroidHello') and from the context menu
select Android Tools --> Export Unsigned
Appliaction Package . Browse the location to
save the apk and click Save button. Click Ok
button in the following window to proceed.
Export Signed Application Package
Right click on the Android project (say
'AndroidHello') and from the context menu
select Android Tools --> Export Signed
Appliaction Package . Select the project to
export and Click Next button.

Categories

Resources