stuck in running android application in AVD - java

So I downloaded the ADT bundle at the android website. I tried making a simple project, the one with HelloWord program. I already added an AVD and tried to run my application. At first, I got stuck at
"Waiting for HOME ('android :process:acore') to be launched"
but after searching the net, I learned that I must right click my project and click run as Android Application and then it was able to proceed with the next lnes in the console.
But after some lines, it gets stuck at the line in the console saying
"Starting activity.com.example.myfirstapp.MainActivity on device emulator:5554"
it's been an hour since that line and nothing has happened in the AVD. I tried using 2 ADT bundles, one for my 32-bit computer and one for my 64-bit computer. Both get stuck at the same line. How do I solve this? I've been working with this issue the whole day. Just when I thought it would be a simple installation.

Launch your emulator from Android Virtual Device(AVD) Manager and run your application

One thing that can really stick your program is a virtual device that is eating up too many resources. Try lowering the amount of RAM your virtual device has. Also be sure you have the latest JDK/JRE installed.
Just picked this book up:
http://www.amazon.com/Android-Development-From-Eclipse-ebook/dp/B00EEI5NHO/
Decently well written an very easy to follow. Walks through building an app in decent detail.

Actually the AVD works very slow on normal configuration systems, it requires a very high config PC to run smooth, you have to wait for sometime to continue with AVD, it will start don't worry. But I would recommend you to run and test your apps on a real android device using the USB debugging feature.

Related

Eclipse to Android studio

So I have a project done which I made in Eclipse, I have also exported it as a Android and somehow imported it in Android Studio, But when I run the program in Android studio, it will execute as Java. And what I want to do is to make it execute in a Android phone (Can also be in a simulator)
But I have not found any tutorials on how to do it and I really need to do it since the essay is ending soon. So I would appreciate all help!
If more info needed, Please, Just comment. I will be available here next 2 hours!
The process should be quite simple if you have already succeeded in importing the project into Android Studio.
If you are using a Mac the process is very simple. If you are using Windows then there is one additional step described below:
In the AndroidManifest.xml make sure you have android:debuggable="true.
If you are using an Android phone with API 4.0+ then go into the phone's Settings and click on About Phone seven times. This might seem like a strange thing to do but it unlocks the phone's developer options, which are hidden by default. On older phones just go to Settings -> Applications -> Development.
In the Developer options select to allow USB debugging.
Now, connect the phone to the computer using a USB cable. You will probably see a message on the phone asking you to authorise the computer for that phone.
Next, open Android Studio and run your application (using the green triangle in the top toolbar). If the arrow is greyed-out then then there was a problem importing or building the project.
Wait while the project builds. It isn't that obvious that the project is being built. The only indication might be that there is a small spinner. If the build process succeeds you will see a prompt to choose a device. Your phone should be listed there. If it isn't, try disconnecting the phone from the USB and reconnecting it.
Select your phone, click OK and away you go. The application should launch on the phone after a few seconds. If it doesn't, be patient sometimes it takes a while. If it still doesn't work, check back in Android Studio for any errors.
Windows Only: Windows requires the additional step of installing the phone's drivers. Details can be found here http://developer.android.com/tools/extras/oem-usb.html

Minimum hardware for Android development?

I have this assignment to run a "hello world" Android app.
The problem is the Android app emulator is stuck on the Android loading screen.
I have searched this problem. They said that Android development needs a faster computer to execute apps neatly.
Is there a way to run it on a netbook?
For example, editing the RAM settings and/or SD card settings so that it can run faster?
Realistically I think your best bet is to try and find a used android phone. You can get them VERY cheaply on Amazon or at other retailers.
If you really can't you can try to muck around with the emulator, but even when it's at it's best the Emulator is a miserable way to do development. You can barely get it running as it is - imagine what happens if you do figure some hacky way to get it running and you try to do anything substantial. It will be a nightmare.
I would also look into upgrading your computer if you are really going to do dev work. A machine that can't run the emulator is a machine that probably can't do most of what you're going to be needing to do. Have you tried your schools computer lab?
Also - as a commentor has stated this question is likely off topic for stack overflow.
Edit: Per Chris Strattons Comment:
You might try disabling various things in your IDE (I'm assuming you're using eclipse) - for example Syntax checking. I would also recommened ensuring that you don't have a web browser, antivirus or other software running in the background which might eat up your computing power. If you're going to run the emulator I would strongly recommend making it the ONLY thing you run.
You may want to look into building and running the application from the command line to avoid the overhead of running and IDE at all:
Please see:
Building from the command line:
http://developer.android.com/tools/building/building-cmdline.html
Running the emulator from the command line:
How do I launch the Android emulator from the command line?
Additionally - is your netbook running Windows or Linux? Windows boxes tend to have higher overhead than Linux machines, so you might try installing a lightweight Linux distro (mint perhaps) and seeing if that helps.
If the problem is getting the emulator to start or your emulator is just too slow, you should look into HAXM:
http://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager
Pretty much all of my emulators are running the x86 image with HAXM for acceleration, and my dev machine has 16GB of RAM. Using ARM images for your emulators is just too slow, especially for your netbook.
Yes, if you are serious about Android Dev (or any Dev really) you need to get something better than a netbook, but for now, see if a little hardware acceleration will do in a pinch.

How to run Java app in Android

Is it possible to run java app (jar) in my android application? Because I need to create PDF, the problem is if I generate PDF in android, only can show with small image, if it contains large image in many pages, it will be error. So I think, I can generate PDF in java and then included to android app.
Concernig the mentiones app JBED:
Well honestly, I could not find any credible source for this tools JBED, so I would really be very cautious (e.g. who is the developer?)
In the manifestfile (in Androidmanifest.xml, where every app has to state what rights it needs to run, see How to view AndroidManifest.xml from APK file?) there are many rights mentioned (what could be necessary, as the app wants to run as an emulator), so a java application might want to send an SMS, record audio, take pictures and place calls -- so the emulator would need those rights as well.
But then the app also registers the "android.intent.action.BOOT_COMPLETED" event (i.e. autostart after boot) and this would go against every description of the tool.
Ah yeah and giveaway: The apk has a folder "certs" that has some (root-)certificates. But those are not the real certificates of the authorities, e.g. Versign. If one installs the app and by that those certificates the trust you might have in https-connections is lost because those who made the fake certificates can create own, false certificates that your phone would trust.
I assume (or am pretty sure) this is a spy tool, but I could be wrong. The (rare) testimonials that claim the tool ran perfectly will probably be the same person that posted the tool under a different name.
Andreas
You can import java Third-party libraries into Android app, follow the steps here.
I am not sure whether it will work,but just try.
If your program is a console program, the answer is yes.
Install Jvdroid from Google play. Click terminal and then write this command: java -jar YourJarFileName.jar
The simplest way would be to some install terminal emulator and then install java and then you can run java apps on standard java. You can even install full Linux distro with x server without rooting the phone, then connect to it from x client and you have Linux desktop on android. Once I've even installed eclipse for java development on it and everything worked. I tested this setup last time in 2014, but I'm pretty sure you can do this nowadays as well. The app with Linux I get from play store as well app for the x client. The app I used back then was "Debian no ROOT" or smthg like this. You need to check what's currently available to make this setup in Google Play store according to your android version and your preferences. Last time I've checked there was a lot of different tools for this kind of task. Lastly I've even successfully installed TF and keras on my android phone using terminal emulator.
You can use JBED. JBED is an .apk Android application which run java games and app on your android Device. JBED is a java android emulator, by using
this application we can install .JAR/.JAD/Java/J2ME/MIDP app on android phones.
You can do it quite easily as there are many ways to run java apps on android. Specific application called Java Emulators can do it quite easily.
These are four most popular java emulators for android viz, JBED, PhoneME, Jblend and NetMite. These are arranged in order of their preference. You can use phoneme for non rooted device, however if your device is rooted try any of the remaining three applications.

Android emulator unbelievable slow in Windows 7

I have a nice PC Desktop that I run all my development applications, Visual Studio, SQL Server instance running, Eclipse, Spring Eclipse etc... everything is fairly fast.
But when I run a simple, little, empty android hello world app, it takes literally 3 or more minutes for the Android get started!!! I don't believe I am the only one experiencing that? I don't want to run in the device every single time... usually it is handy run in the emulator just like I do with XCode to IPhone simulator...
any experience with that? solution tips?
thanks
You can use android-x86 (helpful post). x86 port works faster than emulator, but I recommend use a real device to avoid emulator-specific problems.
The Android emulators, especially the older ones, are notoriously slow. This is because they not only have to run an OS in an OS, but they must also emulate an ARM processor Architecture, on a x86 or x64 processor. This makes them rather slow.
However, you do get Intel images for ICS, which are built for x86 and run faster. You could also try using the older emulators. They got progressively slower upto honeycomb. You could also try increasing the emulator RAM and get a minor speed boost.
Other than that, you could leave the emulator running once started, as then it's much faster to test your apps, since you don't need to start it up everytime.
However, I would personally recommend testing on a device, as you will never get the same quality and accuracy in debugging on an emulator.
There is an Android emulator called Bluestacks that you can use for apps as well. It is less for development and more for playing Android games on your PC, but if you don't mind testing your app in a non-standard launcher environment then it is super fast.
You can even use it for debugging and access DDMS from Eclipse as well by following these steps:
Open Bluestacks
In your 'platform-tools' folder in command prompt, type "adb connect 127.0.0.1"
Try to run your app or debug from Eclipse and you should see a new device listed for Bluestacks.
It doesn't have the same type of hardware/environment emulation that the normal emulator does, so it will not be appropriate for testing all apps, but I use it whenever I can because the normal emulator is such a headache.
So far, there is no solution for that...I have to buy a nexus to run my apps to make the development viable

Win7 x64 Bluecove

I'm trying to use Bluecove for an application I'm writing. Version 2.1 of the jar didn't work, so a little Google showed me that it had always had issues with x64, so I turned to the latest 2.1.1 "snapshot", and I still get that the bluecove_x64 dll is missing. Am I doing something wrong, or should I just look for another API?
I encountered this problem after installing a vendor's bluetooth stack and management utilities. My java app which used bluetooth worked fine before this, after the install I got the bluecove_x64.dll not found error. After much searching, I reverted to an earlier system checkpoint (before I tried installing the "newer" bluetooth) and all was back to normal.
On another system, the toshiba bluetooth software had already been installed. I did a system checkpoint (in case the following was to not work), then went into the device manager, and uninstalled every "device" under bluetooth. Be sure to check the "delete driver software" box too, or they will come right back.
After this, the bluetooth device will appear to be gone. Go to the top of the tree, right click, and do "scan for hardware changes". This should install the Microsoft generic bluetooth drives which then work (for me) just fine on Win7_x64. If this doesn't install them, then you may try searching for a download, or another stack.

Categories

Resources