Wednesday, August 5, 2009

From Java Verified: NEW! R&D Signing. Process:
  1. Register
  2. Request a Publisher ID ($200 US per year)
  3. Sign your application with Publisher ID
  4. Submit - and receive an expired signed application
  5. Change date on the device to day of signing - 7 days
  6. Install on device for R&D testing
Sources: The 10-year valid Java Verified signature still requires submit for testing. The table of supported devices seems updated for Nokia and Sony Ericsson, but not for Motorola, LG and Samsung.

Wednesday, June 24, 2009

A sed one-liner to sort all Maven modules in a multi module project: ls -1 | awk 'BEGIN { OFS="" }; { print "\t\t\t\t", $1, ""}' | grep -v pom.xml

Netbeans Android plugin

Netbeans Android plugin – problems and solutions.

 

Problem: Re-deploy application gives: Failure [INSTALL_FAILED_ALREADY_EXISTS]

Description: Application fails to install because it is already installed

Solution:

  1. Delete manually using emulator menu
  2. Add the following to build.xml (Files ApplicationName build.xml):

<target depends="init,compile,jar,-sign,-start-emulator,-wait-for-emulator,-pre-install-app" name="-install-app">

    <exec executable="${adb}">

        <arg value="install"/>

        <arg value="${dist.apk}"/>

    </exec>

</target>

 

Problem: Build failes because R.java does not exist

Description: Android plugin does not generate R.java

Solution: Add the following to build.xml:

<target name="-pre-compile">

    <echo>Generating R.java / Manifest.java from the resources...</echo>

    <exec executable="${aapt}" failonerror="true">

        <arg value="package" />

        <arg value="-m" />

        <arg value="-J" />

        <arg value="${src.dir}" />

        <arg value="-M" />

        <arg value="AndroidManifest.xml" />

        <arg value="-S" />

        <arg value="${resource.dir}" />

        <arg value="-I" />

        <arg value="${platform.bootcp}"/>

    </exec>

</target>

 

References

http://wiki.netbeans.org/IntroAndroidDevNetBeans
http://en.androidwiki.com/wiki/NetBeans
http://kenai.com/projects/nbandroid/forums/forum/topics/184-Exception-Problem-reporting?