Application not installed in android error - android

I have made application in Netbeans7.1.2 .
my application working perfectly in emulator which is configured android 2.1 but after copying bin folder in Android device(tablet) that gives error "Application not installed".
what is this problem plz if someone know about this ?

Copying bin/ folder is not sufficient enough to warrant an install.
You can do it this way:
Use the Android's SDK tool called adb to install it directly on to the device. For example, suppose your package-name in your project is called org.foo.bar.app and an apk file is generated and called foobar.apk (This will be found in the bin/) folder typically, or where you specify Eclipse to generate the apk, via from within Eclipse:
Right click on project
Click on Android Tools
Click on Export the unsigned Application Package
OR
Click on Export Signed Application Package.
Then:
Plug in cable to device, and issue the command from within Windows Cmd or Linux Terminal, in this manner, adb install foobar.apk
To uninstall an app from the device, specify the package-name, like this adb uninstall org.foo.bar.app

Related

How do I export my project in Android Studio?

I need to export my Android Studio project to an Android phone. I've generated a signed APK already but I don't know what to do after this. What else do I need to do to export my project?
Install it. Look for the apk file in the project folder and transfer it to your phone and click it.
Another way, connect your android phone to your laptop and click on instant Run.
This isn't called exporting, it's called installing.
By default, the APK should be under
app/release/
in your project directory, as app-release.apk.
You can use the Android Studio terminal tab (check the bottom toolbar) to install it directly:
adb install -r app/release/app-release.apk
If you have Android Emulator, then you can directly run and check your app contents.
Or
If you want your app to run on your phone, then go to the app folder of your Android project
Directory : app/release/release.apk
Connect your data cable and move that release.apk in your phone directory and install that apk file in your Android phone.

Android, Run application without emulator or any device

I want to test my app and I don't want to run emulator, unfortunately Windows 8.1 doesn't recognize my Samsung device. I want eclipse just to build the app's APK and I'll test the app by myself by using the file that is created in bin directory.
when you don't have any compatible emulator or any connected device, eclipse asks for running new emulator, I don't want see this dialog !
First: Consider fixing the problem with Windows recognizing your phone.
Second: You can use the Android SDK to make an APK - you can then transfer it to the device the way you prefer (download from webserver, e-mail eg.). Alternatively you can use Google Play + the alpha/beta testing feature to roll out tests to your device (+ any other device you want to test on).
In that case, Only Build the project, then in your project directory look for "bin" folder, you will find an APK file of your project there, you can copy that and install it later on your device
Hope this helps
Unfortunately, building the project alone won't create an APK file. You can export your project to get APK file. For exporting, right-click on your project in Eclipse and select Export..., then choose Export Android Application:
Please note that you have to create a key to export your project and sign it. If you want to create an unsigned package (which must be only used for testing purposes), right-click on your project, then from Android Tools select Export Unsigned Application Package:
You can get the application in the bin folder there you can find the apk.
You can build by running the command "ant clean release install" from your application folder.
On ecllipse editor try this:
go to Windows -> Select Preferences
then Android -> Build
Now uncheck "Skip packaging and dexing until export or launch. (Speeds up automatic builds on file save.)"
You may need to restart ecllipse.

How to create a setup of android project which work on android mobile?

I have created a demo android application.I want to create a setup of demo android project which should install on all android device directly without android market to check application working or not just like a window application.
Thank's in advance
If you want to test your application on all devices you only need to copy .apk file present in your bin folder. It is by default signed with your default keystore. If you did not find any .apk file inside your bin folder than you have to clean build your project once and run it once. Framework will generate one .apk file automatically.
Now only you need to deploy your apk to all devices where you want to test or you can run adb command if your device is in debug mode.
adb install "apk path"
Firstly you should export you android project to apk.....by going to Android Tools-> Export Signed Application Package -> then follow on screen instruction
Then you should connect your devices to computer and run the following command from terminal:
adb install "path to apk file"

How to install an apk on the emulator in Android Studio?

How do you install an apk on the emulator in Android Studio from the terminal?
In Eclipse we did
/home/pcname/android-sdks/platform-tools/adb -s emulator-5554 install /home/pcname/Downloads/apkname.apk
Now how about in Android Studio?
Run simulator -> drag and drop yourApp.apk into simulator screen.
Thats all.
No commands.
EDIT: Even though this answer is marked as the correct answer (in 2013), currently, as answered by #user2511630 below, you can drag-n-drop apk files directly into the emulator to install them.
Original Answer:
You can install .apk files to emulator regardless of what you are using (Eclipse or Android Studio)
here's what I always do: (For full beginners)
1- Run the emulator, and wait until it's completely started.
2- Go to your sdk installation folder then go to platform-tools (you should see an executable called adb.exe)
3- create a new file and call it run.bat, edit the file with notepad and write CMD in it and save it.
4- copy your desired apk to the same folder
5- now open run.bat and write adb install "your_apk_file.apk"
6- wait until the installation is complete
7- voila your apk is installed to your emulator.
Note: to re-install the application if it already existe use adb install -r "your_apk_file.apk"
sorry for the detailed instruction as I said for full beginners
Hope this help.
Regards,
Tarek
For those using Mac and you get a command not found error, what you need to do is
type
./adb install "yourapk.apk"
Start your Emulator from Android Studio Tools->Android-> AVD Manager then select an emulator image and start it.
After emulator is started just drag and drop the APK Very simple.
Just drag APK file to android emulator it will install automatically.
In android studio emulator to run an apk file just drag the apk into the emulator.The emulator will install the apk
Much easier is just to start your emulator, then go to sdk/platform-tools and use adb from there to install apk. Like:
adb install xxx.apk
It will install it on running emulator.
Drag and drop apk if the emulator is launched from Android Studio. If the emulator is started from command line, drag and drop doesn't work, but #Tarek K. Ajaj instructions (above) work.
Note: Installed app won't automatically appear on the home screen, it is in the apps container - the dotted grid icon. It can be dragged from there to the home screen.
For Linux: once emulator is running, the following worked for me.
Because I installed the Android SDK on my home directory, I have the following file structure:
home/Android/Sdk/platform-tools/adb
home/AndroidStudioProjects/Metronome.adk
AndroidStudioProjects is a file folder I made for my Android projects. "Metronome.adk" is the file I want to run.
So, using Terminal from the home directory...
./Android/Sdk/platform-tools/adb install ./AndroidStudioProjects/Metronome.adk
Being a Linux novice, I often forget the need to put the "./" in when trying to locate a file or run a command.
After the command achieves "Success", the app is in the Apps area of the emulator and can be run.
When you start Android studio Look for Profile or Debug apk.
After clicking you get the option to browse for the saved apk and you will be able to later run it using emulator
If Android Studio is already open:
Click on File you can find Profile or Debug apk in this menu too
Just download the apk from talkback website
Drag the downloaded apk to the started emulator, Go to settings on emulator > Search for talkback, you will now find it there
1.Install Android studio.
2.Launch AVD Manager
3.Verify environment variable in set properly based on OS(.bash_profile in mac and environment Variable in windows)
4. launch emulator
5. verify via adb devices command.
6.use adb install apkFileName.apk
Upload your apk file on the cloud , then make a direct download link for downloading and then copy that link and paste it on the emulator browser for download it :) ;
In Android Studio: View - Tool Windows - Gradle
In the Gradle tool window navigate to your :app - Tasks - install
and then execute (by double-clicking): any of your install*tasks: e.g. installDebug, installRelease
Note: the apk will also automatically installed when you Run your application

I used the adb install method for my android phone. I can't find the ap on my phone

I followed a tutorial with adb commands to install an application on my phone, but it is nowhere to be found on my phone.
I used the following command:
adb install androidapp.apk
Can someone please help me? It'll be really appreciated.
If you're compiling and exporting your apk file under SDK version 2.1, it will not work on any android version below your SDK export "2.1". Android software is forward compatible not backward compatible. For example if you're programming using the android NDK (ann add-on to the android SDK) package that allows development in the C/C++ family, this is only compatible with android 2.3, android version 2.2 and below support java builds only. Therefore you will reaceive the "There is a problem parsing the package" error.
Create one new Project and choose AVD with version 2.1 now try to run in both
Procedure to install the apk files in Android Emulator(AVD):
Check your installed directory(ex: C:\Program Files (x86)\Android\android-sdk\tools), whether it has the adb.exe or not). If not present in this folder, then download the attachment here, extract the zip files. You will get adb files, copy and paste those three files inside tools folder
Run AVD manager from C:\Program Files (x86)\Android\android-sdk and start the Android Emulator.
Copy and paste the apk file inside the C:\Program Files (x86)\Android\android-sdk\tools
Go to Start -> Run -> cmd
Type cd “C:\Program Files (x86)\Android\android-sdk\tools”
Type adb install example.apk
After getting success command
Go to Application icon in Android emulator, we can see the your application
Thank you.
when application run on emulator it creates an .apk file on project/bin folder. you just connect your android phone with usb mass storage and then copy this apk to SD card. it will then install the app on phone by clicking the apk file on phone. Otherwise post your code to check

Categories

Resources