Topic
12 replies Latest Post - ‏2012-10-05T21:33:58Z by SystemAdmin
PBB
PBB
6 Posts
ACCEPTED ANSWER

Pinned topic ANDROID programming

‏2010-10-25T00:15:14Z |
I have not been able to get the standard HelloAndroid application to work. This should be easy, but it is not working! Hopefully I have a path or configuration problem. Thank you in advance for helpful input.

Issues include:

1)build error of:
Errors occurred during the build.
Errors running builder 'Android Package Builder' on project 'HelloAndroid'.
sun.security.x509.X500Name

2)then I re-run and get this (note that the APK file is generated by RSA and is located in the /bin directory):

2010-10-24 20:04:35 - HelloAndroid Refreshing resource folders.
2010-10-24 20:04:35 - HelloAndroid Starting incremental Pre Compiler: Checking resource changes.
2010-10-24 20:04:35 - HelloAndroid Nothing to pre compile!
2010-10-24 20:04:35 - HelloAndroid Starting incremental Package build: Checking resource changes.
2010-10-24 20:04:35 - HelloAndroid Using default debug key to sign package
2010-10-24 20:04:35 - HelloAndroid Using keystore: C:\Documents and Settings\lala\.android\debug.keystore
2010-10-24 20:04:35 - HelloAndroid Packaging HelloAndroid.apk
2010-10-24 20:04:35 - HelloAndroid Y:\RAD\HelloAndroid\bin\resources.ap_:
2010-10-24 20:04:35 - HelloAndroid => res/layout/main.xml
2010-10-24 20:04:35 - HelloAndroid => AndroidManifest.xml
2010-10-24 20:04:35 - HelloAndroid => resources.arsc
2010-10-24 20:04:35 - HelloAndroid => res/drawable-hdpi/icon.png
2010-10-24 20:04:35 - HelloAndroid => res/drawable-ldpi/icon.png
2010-10-24 20:04:35 - HelloAndroid => res/drawable-mdpi/icon.png
2010-10-24 20:04:35 - HelloAndroid Y:\RAD\HelloAndroid\bin\classes.dex => classes.dex
2010-10-24 20:05:38 - HelloAndroid
2010-10-24 20:05:38 - HelloAndroid Android Launch!
2010-10-24 20:05:38 - HelloAndroid adb is running normally.
2010-10-24 20:05:38 - HelloAndroid Performing com.android.testing.HelloAndroid activity launch
2010-10-24 20:05:49 - HelloAndroid Launching a new emulator with Virtual Device 'adv-21'
2010-10-24 20:05:51 - HelloAndroid New emulator found: emulator-5554
2010-10-24 20:05:51 - HelloAndroid Waiting for HOME ('android.process.acore') to be launched...
2010-10-24 20:06:14 - HelloAndroid WARNING: Application does not specify an API level requirement!
2010-10-24 20:06:14 - HelloAndroid Device API version is 7 (Android 2.1-update1)
2010-10-24 20:06:14 - HelloAndroid HOME is up on device 'emulator-5554'
2010-10-24 20:06:14 - HelloAndroid Uploading HelloAndroid.apk onto device 'emulator-5554'
2010-10-24 20:06:14 - HelloAndroid Installing HelloAndroid.apk...
2010-10-24 20:06:21 - HelloAndroid Installation failed due to invalid APK file!
2010-10-24 20:06:21 - HelloAndroid Please check logcat output for more details.
2010-10-24 20:06:21 - HelloAndroid Launch canceled!
My configuration is, in part:

  • Platform Details:

  • System properties:
awt.toolkit=sun.awt.windows.WToolkit
cic.appDataLocation=C:\Documents and Settings\All Users\Application Data\IBM\Installation Manager
com.ibm.CORBA.ConfigURL=file:D:\IBM\SDP/runtimes/base_stub/properties/sas.client.props
com.ibm.CORBA.Debug.Output=Y:\RAD\.metadata\orbtrc.txt
com.ibm.SSL.ConfigURL=file:D:\IBM\SDP/runtimes/base_stub/properties/ssl.client.props
com.ibm.cpu.endian=little
com.ibm.jcl.checkClassPath=
com.ibm.oti.configuration=scar
com.ibm.oti.jcl.build=20100326_1904
com.ibm.oti.shared.enabled=true
com.ibm.oti.vm.bootstrap.library.path=D:\IBM\SDP\jdk\jre\bin
com.ibm.oti.vm.library.version=24
com.ibm.util.extralibs.properties=
com.ibm.vm.bitmode=32
com.ibm.xtools.emf.collections.HashedCollectionFactory=true
com.ibm.zero.version=1
eclipse.commands=-os
win32
-ws
win32
-arch
x86
-showsplash
-launcher
D:\IBM\SDP\eclipse.exe
-name
Eclipse
--launcher.library
D:\IBM\SDP\plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.0.v20100503\eclipse_1307.dll
-startup
D:\IBM\SDP\plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
-exitdata
eb4_40
-install
D:/IBM/SDP
-product
com.ibm.rational.rsa4ws.product.v80.ide
-vm
D:\IBM\SDP\jdk/jre/bin/javaw.exe
eclipse.home.location=file:/D:/IBM/SDP/
eclipse.launcher=D:\IBM\SDP\eclipse.exe
eclipse.launcher.name=Eclipse
eclipse.p2.data.area=@config.dir/../p2/
eclipse.p2.profile=bootProfile
eclipse.p2.verifyPlan=false
eclipse.product=com.ibm.rational.rsa4ws.product.v80.ide
eclipse.startTime=1287965028765
eclipse.vm=D:\IBM\SDP\jdk/jre/bin/javaw.exe
eclipse.vmargs=-Xquickstart
-Xms40m
-Xmx1024m
-Xmnx64m
-Xgcpolicy:gencon
-Xscmx48m
-Xshareclasses:name=IBMSDP_%u
-Xnolinenumbers
-XX:MaxPermSize=128M
-Xverify:none
-Declipse.p2.verifyPlan=false
-jar
D:\IBM\SDP\plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
equinox.use.ds=true
file.encoding=Cp1252
file.separator=\
help.URL.default=
help.type.default=remote
help.war=D:\IBM\SDP\help\help.war
ibm.signalhandling.rs=false
ibm.signalhandling.sigchain=true
ibm.signalhandling.sigint=true
ibm.system.encoding=Cp1252
java.assistive=ON
java.awt.fonts=
java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment
java.awt.printerjob=sun.awt.windows.WPrinterJob
java.class.path=D:\IBM\SDP\plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
java.class.version=50.0
java.compiler=j9jit24
java.endorsed.dirs=D:\IBM\SDP\jdk\jre\lib\endorsed
java.ext.dirs=D:\IBM\SDP\jdk\jre\lib\ext
java.fullversion=JRE 1.6.0 IBM J9 2.4 Windows XP x86-32 jvmwi3260sr8-20100401_55940 (JIT enabled, AOT enabled)
J9VM - 20100401_055940
JIT - r9_20100401_15339
GC - 20100308_AA
java.home=D:\IBM\SDP\jdk\jre
java.io.tmpdir=C:\DOCUME~1\pat\LOCALS~1\Temp\
java.jcl.version=20100408_01
java.library.path=D:\IBM\SDP\jdk\jre\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\9.0\DLLShared\;C:\Program Files\Support Tools\;C:\Program Files\Common Files\Intuit\QBPOSSDKRuntime;C:\Program Files\Intel\DMIX;C:\Program Files\Java\jdk6\bin;D:\Programming\android-sdk-windows\tools
java.runtime.name=Java(TM) SE Runtime Environment
java.runtime.version=jvmwi3260sr8-20100401_55940
java.security.properties=file:D:\IBM\SDP/runtimes/base_stub/properties/java.security
java.specification.name=Java Platform API Specification
java.specification.vendor=Sun Microsystems Inc.
java.specification.version=1.6
java.util.prefs.PreferencesFactory=java.util.prefs.WindowsPreferencesFactory
java.vendor=IBM Corporation
java.vendor.url=http://www.ibm.com/
java.version=1.6.0
java.vm.info=JRE 1.6.0 IBM J9 2.4 Windows XP x86-32 jvmwi3260sr8-20100401_55940 (JIT enabled, AOT enabled)
J9VM - 20100401_055940
JIT - r9_20100401_15339
GC - 20100308_AA
java.vm.name=IBM J9 VM
java.vm.specification.name=Java Virtual Machine Specification
java.vm.specification.vendor=Sun Microsystems Inc.
java.vm.specification.version=1.0
java.vm.vendor=IBM Corporation
java.vm.version=2.4
jxe.current.romimage.version=15
jxe.lowest.romimage.version=15
line.separator=
Updated on 2012-10-05T21:33:58Z at 2012-10-05T21:33:58Z by SystemAdmin
  • hanlee@us.ibm.com
    hanlee@us.ibm.com
    1 Post
    ACCEPTED ANSWER

    Re: ANDROID programming

    ‏2010-11-21T13:38:22Z  in response to PBB
    Did you get resolved? I am a newbie to Andorid and got the same error with Eclipse.
  • rramakanth
    rramakanth
    1 Post
    ACCEPTED ANSWER

    Re: ANDROID programming

    ‏2010-11-24T15:00:59Z  in response to PBB
    Does the logcat provide more information?
  • SystemAdmin
    SystemAdmin
    14225 Posts
    ACCEPTED ANSWER

    Re: ANDROID programming

    ‏2010-12-18T15:23:31Z  in response to PBB
    I have the same problem with J9 in Linux. So far the only way I can test an Android project is to use the "ant release" command with a custom keystore file. If I use "ant debug," then I get the error that you mentioned. So far this is a workable solution for me, but I'm not sure I'll have a way to step debug properly.

    Also, it appears J9's version of keytool is incompatible with the Sun version -- it has its a syntax that doesn't match the Google documentation -- and it automatically creates the keystore file in ~/.keystore (without actually telling you where it was created).

    Would be nice if this was resolved.
  • cchalifoux
    cchalifoux
    1 Post
    ACCEPTED ANSWER

    Re: ANDROID programming

    ‏2011-05-01T16:02:39Z  in response to PBB
    Having the same problem, have nothing constructive to add but see no other way to track this thread unless I reply to it .... brother!
    I am using RTC 3.0 iFix 1. I installed the client in the ...\SDP directory via IBMIM to leverage shell sharing with RSA v8.0.2(That's S for Software not System ... don't even ask!)
    Have an open PMR with IBM but they seem to have no clue at this point so it looks like it's up to us to figure this out.
    Of the two items referenced form this link:
    https://www-304.ibm.com/support/docview.wss?uid=swg21422225
    This second one "Specify an alternate JVM for the Rational Team Concert Client" has proved to be a challenge:
    https://www-304.ibm.com/support/docview.wss?rs=3488&uid=swg21320022
    I suspect I may be leaving lines in the eclipse.ini but in any case I always get an error that the JVM does not exist in the directory I am trying to configure Eclipse to when I know for sure it's there.
    Anyone else try this with any success?
    Thanks,
    -Chris
  • SystemAdmin
    SystemAdmin
    14225 Posts
    ACCEPTED ANSWER

    Re: ANDROID programming

    ‏2011-05-04T17:40:15Z  in response to PBB
    If you have a Sun JDK, you can edit RAD's eclipse.ini file's -vm argument. That should enable the Android SDK to work inside RAD.
  • dhmlau
    dhmlau
    1 Post
    ACCEPTED ANSWER

    Re: ANDROID programming

    ‏2011-11-11T04:04:49Z  in response to PBB
    If you don't want to change the eclipse.ini, you could change the JRE settings in the preference page. Go to Windows > Preferences > Java > Installed JREs. Point it to the Sun JDK (Sun JRE might work but I used JDK). Then restart the workbench. Restarting seems to be the key.
    • jim_zhang
      jim_zhang
      86 Posts
      ACCEPTED ANSWER

      Re: ANDROID programming

      ‏2011-11-11T05:15:38Z  in response to dhmlau
      This blog is focused on using RAD (8.0.3) with Android SDK. among other things it contains sample eclipse.ini contents to work with a Sun JDK.
      • jim_zhang
        jim_zhang
        86 Posts
        ACCEPTED ANSWER

        Re: ANDROID programming

        ‏2011-11-11T05:16:19Z  in response to jim_zhang
        ... and here's the link ;-)

        https://www.ibm.com/developerworks/mydeveloperworks/blogs/94e7fded-7162-445e-8ceb-97a2140866a9/entry/developing_hybrid_applications_for_android_try_mobile_web_tools_in_rad_8_0_3_ifix1?lang=en
        • SatishKM
          SatishKM
          1 Post
          ACCEPTED ANSWER

          Re: ANDROID programming

          ‏2011-11-22T12:43:54Z  in response to jim_zhang
          I had another version of java (IBM Version 6)installed in my System. I uninstalled that and pointed it Java in Environment Variable to the Sun JDK version and the same JDK was selected in my Eclipse preference, and the Error went away.Hope it works for other.
          Thanks
  • SystemAdmin
    SystemAdmin
    14225 Posts
    ACCEPTED ANSWER

    Re: ANDROID programming

    ‏2012-01-20T01:46:38Z  in response to PBB
    Hi there, I know it has been a while since this post, but I'd like to contribute any way.
    I hit this issue myself, and I can't install another JDK like the answers up here explains. Truth is that Android plugin make use of some SUN/Oracle only stuff to make everything easy for Eclipse users.

    Well, I decided to go the hard way, given I can't have a different JDK. My solution was simply do what the plugin does manually.
    Here is how to, using the Android plugin export a unsigned package, this does not depend on SUN, so you shouldn't have issues. After that you need to sign your package, since Android only run .apk's that are signed.

    To sign your package you can also use things that the plugin provides you. On Linux you just have to go to /home/<user/.android/debug.keystroke, for more information on that check http://developer.android.com/guide/publishing/app-signing.html#debugmode

    Go to your console and type this:

    jarsigner -keystore /home/<user>/.android/debug.keystore MXAndroid.apk androiddebugkey

    It will ask you for a password, the password is android.

    Ok, you got your .jar signed, next step is to install your package and debug it, to install the package on a emulator/device just run:

    ./adb install /home/<user>/<path_to_your.apk>

    If you have more then one emulator/device you need to specify which, I always use the device, so I always run with the -d option that goes directly to my pluged in device. For more information, http://developer.android.com/guide/developing/tools/adb.html#move

    If you want to check the logs for your emulator/device just run

    ./adb logcat

    And run your app.

    Hope someone can make use of those instructions
  • SystemAdmin
    SystemAdmin
    14225 Posts
    ACCEPTED ANSWER

    Re: ANDROID programming

    ‏2012-03-16T08:28:04Z  in response to PBB
    I also encontered this problem, and try these cases but all failed.

    Errors occurred during the build.
    Errors running builder 'Android Package Builder' on project 'HelloActivity'.
    sun/security/x509/X500Name
    • SystemAdmin
      SystemAdmin
      14225 Posts
      ACCEPTED ANSWER

      Re: ANDROID programming

      ‏2012-10-05T21:33:58Z  in response to SystemAdmin
      The issue is caused by the use of the IBM JDK. Even though, you might have the Sun JDK 'set' as your eclipse default (Window/Preferences/Java/Installed JREs)... it might not be enough.

      The best way to get around this issue imho, is to explicitly load Eclipse with the SUN JDK. This can be done at the command line like this:

      eclipse -vm /home/path_to_jdk/java

      (You can also use the eclipse.ini file.)

      So.. even though you 'think' you are using the SUN JDK, chances are you're not IF Eclipse was started with the IBM JDK.
      Cheers.