Results 1 to 2 of 2
Like Tree1Likes
  • 1 Post By bal00

Thread: Android is wallopping my backside

  1. #1
    blackbird is offline Senior Member
    Join Date
    Jul 2011
    Posts
    100
    Rep Power
    0

    Default Android is wallopping my backside

    Hello Everyone,

    I've created my first ("Hello, World" type (actually, "Yeaux, Dudimus")) Android app.

    A lot of the stuff here I will probably later laugh at, but as I said, this is my very first attempt at an Android app (I'm pretty new to Java also, having come from the Delphi and then C# world).

    Anyway and without further ad[ieu,o]: When I right-click the project in Eclipse and select Run As -> Android Application, I get the Android AVD Error "No compatible targets were found. Do you wish to a add [sic] new Android Virtual Device?"

    I mash "Yes" and then have to select the solitary entry in "Android SDK and AVD Manager | Virtual Devices" (in my case an AVD I named "bobas_avd" with TargetName "Android 2.1-update 1", platform the same, API Level 7, CPU/ABI ARM (armeabi)

    Then I select the "Start" button, and "Launch" from the next dialog.

    EVERY TIME I run my appp I have to do this. What do I need to do so that it will remember which AVD to use?

    Also, the Emulator starts (5554:bobas_avd), with a pulsing "android" in the middle left, with the android buttons and keyboard to the right, and eventually other stuff displays (Google this and that, unsurprisingly).

    However, my app doesn't run (I don't see the expected "Hello, World").

    What [am, have] I done wrong?

    The Messages in Eclipse's Console area, the contents of the Error Log, and the code (trivial) follows:

    These are the messages in Eclipse's Console area:

    [2011-07-26 22:28:10 - YeauxDudimus] Still no compatible AVDs with target 'Android 3.2': Aborting launch.
    [2011-07-26 22:28:10 - YeauxDudimus] Performing com.bobas.YeauxDudimusActivity activity launch
    [2011-07-26 22:28:34 - YeauxDudimus] ERROR: Application requires API version 13. Device API version is 7 (Android 2.1-update1).
    [2011-07-26 22:28:34 - YeauxDudimus] Launch canceled!

    This is the contents of the Error Log:

    !SESSION 2011-07-02 14:19:39.546 -----------------------------------------------
    eclipse.buildId=I20110613-1736
    java.version=1.6.0_18
    java.vendor=Sun Microsystems Inc.
    BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
    Framework arguments: -product org.eclipse.epp.package.java.product
    Command-line arguments: -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.java.product


    !ENTRY org.eclipse.jdt.ui 2 0 2011-07-02 14:54:31.078
    !MESSAGE The 'org.eclipse.mylyn.java.ui.javaAllCompletionPropos alComputer' proposal computer from the 'org.eclipse.mylyn.java.ui' plug-in did not complete normally. The extension took too long to return from the 'computeCompletionProposals()' operation.
    !SESSION 2011-07-09 06:59:37.968 -----------------------------------------------
    eclipse.buildId=I20110613-1736
    java.version=1.6.0_26
    java.vendor=Sun Microsystems Inc.
    BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
    Framework arguments: -product org.eclipse.epp.package.java.product
    Command-line arguments: -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.java.product


    !ENTRY org.eclipse.epp.usagedata.recording 1 0 2011-07-09 07:03:23.296
    !MESSAGE Usage data uploaded to Usage Data Collector in 4125 milliseconds.
    !SESSION 2011-07-22 06:56:47.906 -----------------------------------------------
    eclipse.buildId=I20110613-1736
    java.version=1.6.0_26
    java.vendor=Sun Microsystems Inc.
    BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
    Framework arguments: -product org.eclipse.epp.package.java.product
    Command-line arguments: -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.java.product


    !ENTRY org.eclipse.epp.usagedata.recording 1 0 2011-07-22 06:57:29.937
    !MESSAGE Usage data uploaded to Usage Data Collector in 2796 milliseconds.
    !SESSION 2011-07-25 06:37:38.343 -----------------------------------------------
    eclipse.buildId=I20110613-1736
    java.version=1.6.0_26
    java.vendor=Sun Microsystems Inc.
    BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
    Framework arguments: -product org.eclipse.epp.package.java.product
    Command-line arguments: -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.java.product


    !ENTRY com.android.ide.eclipse.adt 4 0 2011-07-25 20:15:10.031
    !MESSAGE Failed to load properties file for project 'YeauxDudimus'


    !ENTRY org.eclipse.osgi 2 0 2011-07-25 20:15:51.750
    !MESSAGE While loading class "org.eclipse.m2e.core.internal.embedder.ExtensionM odule", thread "Thread[Worker-70,5,main]" timed out waiting (5016ms) for thread "Thread[Worker-73,5,main]" to finish starting bundle "org.eclipse.m2e.core_1.0.0.20110607-2117 [170]". To avoid deadlock, thread "Thread[Worker-70,5,main]" is proceeding but "org.eclipse.m2e.core.internal.embedder.ExtensionM odule" may not be fully initialized.
    !STACK 0
    org.osgi.framework.BundleException: State change in progress for bundle "reference:file:plugins/org.eclipse.m2e.core_1.0.0.20110607-2117.jar" by thread "Worker-73".
    at org.eclipse.osgi.framework.internal.core.AbstractB undle.beginStateChange(AbstractBundle.java:1087)
    at org.eclipse.osgi.framework.internal.core.AbstractB undle.start(AbstractBundle.java:297)
    at org.eclipse.osgi.framework.util.SecureAction.start (SecureAction.java:440)
    at org.eclipse.osgi.internal.loader.BundleLoader.setL azyTrigger(BundleLoader.java:268)
    at org.eclipse.core.runtime.internal.adaptor.EclipseL azyStarter.postFindLocalClass(EclipseLazyStarter.j ava:107)
    at org.eclipse.osgi.baseadaptor.loader.ClasspathManag er.findLocalClass(ClasspathManager.java:462)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClass Loader.findLocalClass(DefaultClassLoader.java:216)
    at org.eclipse.osgi.internal.loader.BundleLoader.find LocalClass(BundleLoader.java:400)
    at org.eclipse.osgi.internal.loader.BundleLoader.find ClassInternal(BundleLoader.java:476)
    at org.eclipse.osgi.internal.loader.BundleLoader.find Class(BundleLoader.java:429)
    at org.eclipse.osgi.internal.loader.BundleLoader.find Class(BundleLoader.java:417)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClass Loader.loadClass(DefaultClassLoader.java:107)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at org.eclipse.m2e.core.internal.embedder.MavenImpl.n ewPlexusContainer(MavenImpl.java:1116)
    at org.eclipse.m2e.core.internal.embedder.MavenImpl.g etPlexusContainer(MavenImpl.java:1048)
    at org.eclipse.m2e.core.internal.embedder.MavenImpl.l ookup(MavenImpl.java:1102)
    at org.eclipse.m2e.core.internal.embedder.MavenImpl.c reateExecutionRequest(MavenImpl.java:202)
    at org.eclipse.m2e.core.internal.project.registry.Pro jectRegistryManager.refresh(ProjectRegistryManager .java:294)
    at org.eclipse.m2e.core.internal.project.registry.Pro jectRegistryRefreshJob.run(ProjectRegistryRefreshJ ob.java:87)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.j ava:54)
    Caused by: org.eclipse.osgi.framework.internal.core.AbstractB undle$BundleStatusException
    ... 20 more
    Root exception:
    org.eclipse.osgi.framework.internal.core.AbstractB undle$BundleStatusException
    at org.eclipse.osgi.framework.internal.core.AbstractB undle.beginStateChange(AbstractBundle.java:1087)
    at org.eclipse.osgi.framework.internal.core.AbstractB undle.start(AbstractBundle.java:297)
    at org.eclipse.osgi.framework.util.SecureAction.start (SecureAction.java:440)
    at org.eclipse.osgi.internal.loader.BundleLoader.setL azyTrigger(BundleLoader.java:268)
    at org.eclipse.core.runtime.internal.adaptor.EclipseL azyStarter.postFindLocalClass(EclipseLazyStarter.j ava:107)
    at org.eclipse.osgi.baseadaptor.loader.ClasspathManag er.findLocalClass(ClasspathManager.java:462)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClass Loader.findLocalClass(DefaultClassLoader.java:216)
    at org.eclipse.osgi.internal.loader.BundleLoader.find LocalClass(BundleLoader.java:400)
    at org.eclipse.osgi.internal.loader.BundleLoader.find ClassInternal(BundleLoader.java:476)
    at org.eclipse.osgi.internal.loader.BundleLoader.find Class(BundleLoader.java:429)
    at org.eclipse.osgi.internal.loader.BundleLoader.find Class(BundleLoader.java:417)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClass Loader.loadClass(DefaultClassLoader.java:107)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at org.eclipse.m2e.core.internal.embedder.MavenImpl.n ewPlexusContainer(MavenImpl.java:1116)
    at org.eclipse.m2e.core.internal.embedder.MavenImpl.g etPlexusContainer(MavenImpl.java:1048)
    at org.eclipse.m2e.core.internal.embedder.MavenImpl.l ookup(MavenImpl.java:1102)
    at org.eclipse.m2e.core.internal.embedder.MavenImpl.c reateExecutionRequest(MavenImpl.java:202)
    at org.eclipse.m2e.core.internal.project.registry.Pro jectRegistryManager.refresh(ProjectRegistryManager .java:294)
    at org.eclipse.m2e.core.internal.project.registry.Pro jectRegistryRefreshJob.run(ProjectRegistryRefreshJ ob.java:87)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.j ava:54)


    !ENTRY org.eclipse.m2e.logback.appender 4 0 2011-07-25 20:19:04.984
    !MESSAGE Unable to update index for central|Directory Browsing Disabled


    !ENTRY org.eclipse.jface 2 0 2011-07-25 20:28:08.687
    !MESSAGE Keybinding conflicts occurred. They may interfere with normal accelerator operation.
    !SUBENTRY 1 org.eclipse.jface 2 0 2011-07-25 20:28:08.687
    !MESSAGE A conflict occurred for ALT+CTRL+J:
    Binding(ALT+CTRL+J,
    ParameterizedCommand(Command(org.eclipse.ui.edit.t ext.join.lines,Join Lines,
    Join lines of text,
    Category(org.eclipse.ui.category.textEditor,Text Editing,Text Editing Commands,true),
    LegacyHandlerWrapper(ActionHandler(action=org.ecli pse.ui.texteditor.JoinLinesAction@178b5d4)),
    ,,true),null),
    org.eclipse.ui.defaultAcceleratorConfiguration,
    org.eclipse.ui.textEditorScope,,,system)
    Binding(ALT+CTRL+J,
    ParameterizedCommand(Command(com.cloudgarden.jiglo o.commands.openJiglooPrefs,Open Jigloo Preferences Page,
    Open Jigloo Preferences Page,
    Category(com.cloudgarden.jigloo.actions.category,J igloo,Jigloo Actions,true),
    ,
    ,,true),null),
    org.eclipse.ui.defaultAcceleratorConfiguration,
    org.eclipse.ui.textEditorScope,,,system)
    !SESSION 2011-07-26 18:20:55.960 -----------------------------------------------
    eclipse.buildId=I20110613-1736
    java.version=1.6.0_26
    java.vendor=Sun Microsystems Inc.
    BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
    Framework arguments: -product org.eclipse.epp.package.java.product
    Command-line arguments: -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.java.product


    !ENTRY org.eclipse.jface 2 0 2011-07-26 18:21:21.773
    !MESSAGE Keybinding conflicts occurred. They may interfere with normal accelerator operation.
    !SUBENTRY 1 org.eclipse.jface 2 0 2011-07-26 18:21:21.773
    !MESSAGE A conflict occurred for ALT+CTRL+J:
    Binding(ALT+CTRL+J,
    ParameterizedCommand(Command(org.eclipse.ui.edit.t ext.join.lines,Join Lines,
    Join lines of text,
    Category(org.eclipse.ui.category.textEditor,Text Editing,Text Editing Commands,true),
    LegacyHandlerWrapper(ActionHandler(action=org.ecli pse.ui.texteditor.JoinLinesAction@1486540)),
    ,,true),null),
    org.eclipse.ui.defaultAcceleratorConfiguration,
    org.eclipse.ui.textEditorScope,,,system)
    Binding(ALT+CTRL+J,
    ParameterizedCommand(Command(com.cloudgarden.jiglo o.commands.openJiglooPrefs,Open Jigloo Preferences Page,
    Open Jigloo Preferences Page,
    Category(com.cloudgarden.jigloo.actions.category,J igloo,Jigloo Actions,true),
    ,
    ,,true),null),
    org.eclipse.ui.defaultAcceleratorConfiguration,
    org.eclipse.ui.textEditorScope,,,system)


    and here is my code, such as it is:


    Java Code:
    package com.bobas;
    
    
    import android.app.Activity;
    import android.os.Bundle;
    import android.widget.TextView;
    
    
    public class YeauxDudimusActivity extends Activity {
        /** Called when the activity is first created. */  
      @Override    
      public void onCreate(Bundle savedInstanceState) {        
        super.onCreate(savedInstanceState);        
        TextView tv = new TextView(this);        
        tv.setText("Yeaux, Dudimus");        
        setContentView(tv);        
        //setContentView(R.layout.main);    
      }
    }

  2. #2
    bal00 is offline Member
    Join Date
    Aug 2011
    Posts
    2
    Rep Power
    0

    Default

    Hm, hopefully this is still relevant.

    First you will have to open your AndroidManifest.xml and edit this entry:

    <uses-sdk android:minSdkVersion="13" />

    Your app refuses to launch because according to the manifest it needs at least Android 3.2, and you're installing it on a 2.1 emulator. If you change it to 7, it'll run on 2.1.

    That's probably also why Eclipse can't find a suitable emu.



    In order to sort out the emulator situation, you will want to open the AVD Manager (Window menu in Eclipse), edit your current AVD and tick the checkbox to enable Snapshots. Back in the AVD manager, start your AVD and tick 'launch from snapshot' and 'save to snapshot'. The next time you close the emulator, it'll save a memory snapshot and use that (rather than perform an actual boot), so subsequent launches will only take a few seconds.

    Now that you're good as far as the emulator goes, you will want to edit the launch settings. Open Run->Run Configurations->Target, set the deployment target to automatic and select your AVD.

    Also, leave the emulator running. There's no need to close it just to reinstall a new version of your app. If there's a compatible emulator already running, Eclipse will simply push the app to the emu and launch it, which takes 2 seconds.
    blackbird likes this.

Similar Threads

  1. Android Help
    By fresh83 in forum Android
    Replies: 1
    Last Post: 05-19-2011, 09:44 PM
  2. android sdk
    By aizen92 in forum Android
    Replies: 2
    Last Post: 02-21-2011, 11:28 PM
  3. Android USB
    By Blackberrylerner in forum Android
    Replies: 0
    Last Post: 01-15-2011, 06:05 AM
  4. Android
    By sspkiet in forum Android
    Replies: 1
    Last Post: 09-03-2010, 02:14 AM
  5. Familiar with Android?
    By xcallmejudasx in forum New To Java
    Replies: 1
    Last Post: 10-06-2009, 05:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •