I just picked up "Beginning Android 4" by apress and in chapter 3 they have you make your first app. I've gone through it and though a few settings don't match completely (I'm guessing because the android api has been updated since the book was written), it all runs fine. However, the book says I should see the icon for my "Now" project/app in the main menu of apps. It's not there so I'm not sure what might be wrong. Does anyone know if there's a trick to getting it to show up? I'm using the eclipse editor and android plugins. Thanks.
Run your app on the emulator After you have created an Android Virtual Device (AVD), you can start the Android Emulator and run an app in your project: In the toolbar, select the AVD that you want to run your app on from the target device drop-down menu. Click Run.
If the Android Emulator does not start properly, this problem is often caused by problems with HAXM. HAXM issues are often the result of conflicts with other virtualization technologies, incorrect settings, or an out-of-date HAXM driver. Try reinstalling the HAXM driver, using the steps detailed in Installing HAXM.
If it's a white screen, it means it is loading. Before it happened to me, and I clicked on the white screen for some times, then it successfully loaded my project. It may be that your Project includes something that the Emulator is incompatible with (an extension for example).
I had this same problem! I was seeing this in the console:
No Launcher activity found!
You need to specify the MAIN and LAUNCHER in the the intent filter for the activity you want to start on launch! There is another stackoverflow answer explaining the solution here.
Basically make sure your AndroidManifest.xml has the MAIN and LAUNCHER arguments specified like this:
<application android:label="@string/app_name" android:icon="@drawable/icon">
<activity android:name="ExampleActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
After you create your program, right click on the project and hit Run As > Android Application; this should upload the .apk and install it on your emulator - once that is finished, it will load up.
If it doesn't load up - check what the Console has to say (It's a tab in Eclipse on the bottom) as something could have gone wrong.
Make sure you don't have any red lines in your code - that means there's an error.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With