Android - Exporting a Project - java

What are the options for exporting a project (into a jar or something) if I want to be able to allow anyone to easily install the app on their device by just having the jar (or whatever object it is). If this is done by making a jar, how does one install the app once they have the jar?

To generate apk
Go Build option in Tool bar of Android Studio
click Generate Apk
Locate the Generated apk on disk and transfer or copy that apk file to mobile device
open apk file from mobile and it is got installed

Connect mobile to pc through usb, Run command adb install yourapp.apk.
P.S: enable usb debugging in developer option.

Related

APK files not install on my oppo a37

I made a simple app by using android studio & build both signed and unsigned apk files. Then put those files into my oppo a37 device and try to install those. But both files gave following error message.
"Unable to install because of an error in the app APK. We recommend installing only certified apps from the play store."
I already checked these APKs by using android studio emulator and both works fine...
Please help me... Thank you...
Go to Files in OPPO A37 phone and select APK icon. Then you can see your downloaded apk file. Click install:

UIautomator - Android Studio - How to generate an APK or JAR file

I have a project in Android Studio, using UIAutomator, but I don't want to open Android studio everytime I need to run it.
How can I generate a APK, Jar file or anything that can be launched? I don't want smart or safe methods, but the simple the better. It has to be using Android Studio, not eclise or any other IDE.
It generates APK, but it doesn't open properly, I don't have any GUI coded, just test classes.
Thanks,
Only way you can achieve this by storing APK on your android mobile, here is simplest way to do so
Connect your android mobile and choose the device as emulator while running the project,by doing this you will find APK installed on your mobile device that you can run anytime you want.
here are steps to follow :-
https://www.youtube.com/watch?v=Qb2olFyoMV4

Android App Does Not Install Correctly When Running From Eclipse

I am building an Android application in Eclipse and I am testing the app on my cell phone (Samsung Galaxy S5). When I Run As -> Android Application in the package explorer with my phone connected the Console says that it installed successfully, however, it does not pull up the application on my phone like normal. It does create an icon in all apps but when I click it a toast pops up saying 'Application not installed.' There seems to be no problem with Eclipse though because I can run this same process with another Android project and it will work just fine. I didn't do anything different with my current project. I did this process successfully with this project and it pulled up like it should before it started not installing correctly. Any thoughts?
Migrate to android studio. Google stopped supporting eclipse in android development. You may not have added launcher activity in the manifest, check it. Or it should be installation error using usb. Try to copy paste apk from your project bin folder to device and install. If doesn't work show your main class file and manifest file.

Can't install generated APK

I've been doing an application that uses GCM api. It works perfectly well if I use eclipse to install the app in the phone. But when I export the APK file and try to install it manually in the same terminal it just says Application not installed, I tried to check LogCat but it did not help. I also tried to generate the apk from android studio but the same problem occurred.
I think the problem might be related to the libraries that I need to use in my app using GCM, because if I install it using DDMS the app size is 15 MB but the apk file generated is 2.5 MB.
I tried creating a new project but didn't help.
edit
To generate APK i right click in the project android tools -> Export unsigned application Package (In Eclipse).
With install manually i mean installing APK from internal memory instead of using USB debugging.
Thanks.
You cannot instal an APK that is unsigned. I don't know Eclipse, but I bet it does the same as Android Studio when debugging, that is it signs the APK automatically with the debug certificate and that's why it works without problems that way.
Is there an option in Eclipse to export a signed APK? Otherwise you'll have to set up something to sign your APK with a release certificate that you have made yourself.
You can read more about APK signing on this Android developer guide.

What target environment should I use to compile android Camera app code?

I am a .NEt developer but recently i am having to deal with some android /java code. I downloaded Android OS's camera app source code from following location:
https://android.googlesource.com/platform/packages/apps/Camera
Now, I am having these files on my Windows 7 machine. When I do a simple search of "How to compile android apk code on windows" most of the searches result in saying that it is very non trivial and I need Mac or Unix machine for it.
Now, Looks like this is all bunch of java files. But I am not sure what should b emy target environment to try to compile all these files?
Follow these steps:
Download adt bundle here
Extract the zip and start ecllipse ide
Create a new emulator on which you run your application. It looks like a mobile icon.
then goto file->import->android->existing android project to workspace
Browse to your downloaded location select your project
Run

Categories

Resources