In preperation for adding android source to an existing source tree (which has it's own build system and version control and thus we do not want to be forced to switch to ant/git) I am attempting to do a manual build under froyo of HelloAndroid (works perfectly with ant) and I have been able to replicate the process (as far I can tell) all the way up to the adb install and then it fails on bad magic numbers in the dexopt phase of install:
D/AndroidRuntime( 519): D/AndroidRuntime( 519): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<< D/AndroidRuntime( 519): CheckJNI is OFF D/AndroidRuntime( 519): --- registering native functions --- D/PackageParser( 79): Scanning package: /data/app/vmdl20525.tmp I/PackageParser( 79): Impliciting adding android.permission.WRITE_EXTERNAL_STORAGE to old pkg com.h I/PackageParser( 79): Impliciting adding android.permission.READ_PHONE_STATE to old pkg com.h E/PackageManager( 79): Package com.h has mismatched uid: 10050 on disk, 10041 in settings I/PackageManager( 79): /data/app/vmdl20525.tmp changed; unpacking D/installd( 52): DexInv: --- BEGIN '/data/app/vmdl20525.tmp' --- W/dalvikvm( 525): DexOptZ: zip archive '/data/app/vmdl20525.tmp' does not include classes.dex W/installd( 52): DexInv: --- END '/data/app/vmdl20525.tmp' --- status=0xff00, process failed E/installd( 52): dexopt failed on '/data/dalvik-cache/ data@[email protected]@classes.dex' res = 65280 W/PackageManager( 79): Package couldn't be installed in /data/app/ com.h.apk D/AndroidRuntime( 519): Shutting down VM D/dalvikvm( 519): DestroyJavaVM waiting for non-daemon threads to exit D/dalvikvm( 519): DestroyJavaVM shutting VM down D/dalvikvm( 519): HeapWorker thread shutting down D/dalvikvm( 519): HeapWorker thread has shut down D/jdwp ( 519): JDWP shutting down net... D/dalvikvm( 519): VM cleaning up D/dalvikvm( 519): LinearAlloc 0x0 used 662676 of 4194304 (15%) D/dalvikvm( 79): GC freed 8599 objects / 444928 bytes in 220ms below is the script I have so far for the build: aapt package -f -M AndroidManifest.xml -I /home/aryeh/android-AOSP-2.2- i386-distro-20100709/platforms/android-8/android.jar -S res -m -J src javac -bootclasspath /home/aryeh/android-AOSP-2.2-i386-distro-20100709/ platforms/android-8/android.jar -sourcepath src -d obj src/com/h/ HelloWorld.java -target 1.5 -encoding ascii dx --dex --output=classes.dex obj aapt package -f -M AndroidManifest.xml -S res -I /home/aryeh/android- AOSP-2.2-i386-distro-20100709/platforms/android-8/android.jar -F helloworld.apk apkbuilder helloworld-debug.apk -u -z helloworld.apk -f helloworld.apk jarsigner -keystore ../.android/debug.keystore -storepass android - keypass android -signedjar helloworld-debug-signed.apk helloworld- debug.apk androiddebugkey aapt list helloworld-debug-signed.apk ~/hellowolrd aryeh@flosoft-stable% sh ack THIS TOOL IS DEPRECATED. See --help for more information. Warning: The signer certificate will expire within six months. META-INF/MANIFEST.MF META-INF/ANDROIDD.SF META-INF/ANDROIDD.DSA res/layout/main.xml AndroidManifest.xml resources.arsc res/drawable-hdpi/icon.png res/drawable-ldpi/icon.png res/drawable-mdpi/icon.png classes.dex 705 KB/s (21643 bytes in 0.029s) pkg: /data/local/tmp/helloworld-debug-signed.apk Failure [INSTALL_FAILED_DEXOPT] adb install helloworld-debug-signed.apk just for ref here is the output of the above manual procedure: -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

