Author Topic: Error messages when building Android project  (Read 14072 times)

pa-gjerd@online.no

  • Newbie
  • *
  • Posts: 1
Error messages when building Android project
« on: July 01, 2012, 02:20:45 PM »
Have installed Java 6.0 ,  Android SDK, Apple QuickTime according to instructions for installing Hypernext.  HyperNext paths are also set up according to instructions.  Emulator set up and driver to actual device installed successfully Have tried installation on two different PC's running Win7 64bit. When building app error messages as shown below occurs (full log at end)

java.io.FileNotFoundException: C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\bin\Tenerife.ap_ does not exist


Debug Key Enter Passphrase for keystore: jarsigner: unable to open jar file: C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\dist\Tenerife.apk

-jarsigner: java.util.zip.ZipException: error in opening zip file
-
shell jar verify failed


1 - Compiling HyperNext code
Android Copy Runtime ....  DONE
PH_1 Android Copy Resources ....  DONE
PH_2 Android_CopyStack....  DONE
PH_3 Android Updating Manifest ... DONE
PH_4 Android Repackaging.....
PH_4 aapt package -f -v --version-code 1 -M "C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\AndroidManifest.xml" -I "C:\Android\android-sdk\platforms\android-9\android.jar" -0 stk -F "C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\bin\Tenerife.ap_" -A "C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\assets" -S "C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\res" --rename-manifest-package org.Tenerife
Repackaging..
C:\Data\HyperNext\Tenerife>cd "C:\Android\android-sdk\platform-tools\"

C:\Android\android-sdk\platform-tools>aapt package -f -v --version-code 1 -M "C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\AndroidManifest.xml" -I "C:\Android\android-sdk\platforms\android-9\android.jar" -0 stk -F "C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\bin\Tenerife.ap_" -A "C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\assets" -S "C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\res" --rename-manifest-package org.Tenerife
Found 24 custom asset files in C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\assets
Configurations:
 (default)

Files:
  assets\Local\IMG_3672.jpg
    Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\assets\Local\IMG_3672.jpg
  assets\Local\blank.mov
    Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\assets\Local\blank.mov
  assets\Local\hnr_icon.jpg
    Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\assets\Local\hnr_icon.jpg
  assets\Local\icon.jpg
    Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\assets\Local\icon.jpg
  assets\black800x600.jpg
    Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\assets\black800x600.jpg
  assets\hnr_icon.jpg
    Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\assets\hnr_icon.jpg
  assets\icon.jpg
    Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\assets\icon.jpg
  assets\splash.jpg
    Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\assets\splash.jpg
  assets\stack.stk
    Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\assets\stack.stk
  assets\test1.txt
    Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\assets\test1.txt
  assets\zz589x4_beep1.ogg
    Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\assets\zz589x4_beep1.ogg
  assets\zz589x4_beep1.wav
    Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\assets\zz589x4_beep1.wav
  assets\zz589x4_btn_check_off.png
    Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\assets\zz589x4_btn_check_off.png
  assets\zz589x4_btn_check_off_disable.png
    Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\assets\zz589x4_btn_check_off_disable.png
  assets\zz589x4_btn_check_on.png
    Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\assets\zz589x4_btn_check_on.png
  assets\zz589x4_btn_check_on_disable.png
    Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\assets\zz589x4_btn_check_on_disable.png
  assets\zz589x4_btn_check_on_pressed.png
    Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\assets\zz589x4_btn_check_on_pressed.png
  assets\zz589x4_btn_radio_off.png
    Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\assets\zz589x4_btn_radio_off.png
  assets\zz589x4_btn_radio_on.png
    Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\assets\zz589x4_btn_radio_on.png
  assets\zz589x4_btn_radio_on_pressed.png
    Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\assets\zz589x4_btn_radio_on_pressed.png
  assets\zz589x4_btn_square_disabled.png
    Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\assets\zz589x4_btn_square_disabled.png
  assets\zz589x4_btn_square_normal.png
    Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\assets\zz589x4_btn_square_normal.png
  assets\zz589x4_btn_square_pressed.png
    Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\assets\zz589x4_btn_square_pressed.png
  assets\zz589x4_cursor1.png
    Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\assets\zz589x4_cursor1.png
  drawable\hnr_icon.jpg
    Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\res\drawable\hnr_icon.jpg
  drawable\hnr_icon.png
    Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\res\drawable\hnr_icon.png
  drawable\icon.jpg
    Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\res\drawable\icon.jpg
  drawable\icon.png
    Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\res\drawable\icon.png
  drawable\notification_icon.jpg
    Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\res\drawable\notification_icon.jpg
  layout\card.xml
    Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\res\layout\card.xml
  layout\main.xml
    Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\res\layout\main.xml
  layout\menu.xml
    Src: () C:\Users\Emma\AppData\Roaming\HAC_D
Repackaging.. ata\data\HN_Runtime\res\layout\menu.xml
  layout\settings.xml
    Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\res\layout\settings.xml
  layout\splash.xml
    Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\res\layout\splash.xml
  raw\testh1
    Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\res\raw\testh1
  values\integers.xml
    Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\res\values\integers.xml
  values\strings.xml
    Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\res\values\strings.xml
  AndroidManifest.xml
    Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\AndroidManifest.xml

Resource Dirs:
  Type drawable
    drawable\hnr_icon.jpg
      Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\res\drawable\hnr_icon.jpg
    drawable\hnr_icon.png
      Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\res\drawable\hnr_icon.png
    drawable\icon.jpg
      Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\res\drawable\icon.jpg
    drawable\icon.png
      Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\res\drawable\icon.png
    drawable\notification_icon.jpg
      Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\res\drawable\notification_icon.jpg
  Type layout
    layout\card.xml
      Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\res\layout\card.xml
    layout\main.xml
      Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\res\layout\main.xml
    layout\menu.xml
      Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\res\layout\menu.xml
    layout\settings.xml
      Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\res\layout\settings.xml
    layout\splash.xml
      Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\res\layout\splash.xml
  Type raw
    raw\testh1
      Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\res\raw\testh1
  Type values
    values\integers.xml
      Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\res\values\integers.xml
    values\strings.xml
      Src: () C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\res\values\strings.xml
Including resources from package: C:\Android\android-sdk\platforms\android-9\android.jar
applyFileOverlay for drawable
applyFileOverlay for layout
applyFileOverlay for anim
applyFileOverlay for animator
applyFileOverlay for interpolator
applyFileOverlay for xml
applyFileOverlay for raw
applyFileOverlay for color
applyFileOverlay for menu
applyFileOverlay for mipmap
Processing image: C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\res\drawable\hnr_icon.png
Processing image: C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\res\drawable\icon.png
    (processed image C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\res\drawable\icon.png: 95% size of source)
    (processed image C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\res\drawable\hnr_icon.png: 97% size of source)
    (new resource id hnr_icon from C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\res\drawable\hnr_icon.jpg)
    (new resource id hnr_icon from drawable\hnr_icon.png #generated)
    (new resource id icon from C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\res\drawable\icon.jpg)
    (new resource id icon from drawable\icon.png #generated)
    (new resource id notification_icon from C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\res\drawable\notification_icon.jpg)
    (new resource id card from C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\res\layout\card.xml)
    (new resource id main from C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\res\layout\main.xml)
    (new resource id menu from C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\res\layout\menu.xml)
    (new resource id settings from C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\res\layout\settings.xml)
    (new resource id splash from C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\res\layout\splash.xml)
Repackaging..
    (new resource id testh1 from C:\Users\Emma\AppData\Roaming\HAC
Repackaging.. _Data\data\HN_Runtime\res\raw\testh1)
Warning: AndroidManifest.xml already defines versionCode (in http://schemas.android.com/apk/res/android); using existing value in manifest.
res\drawable\hnr_icon.png:0: error: Resource entry hnr_icon is already defined.
res\drawable\hnr_icon.jpg:0: Originally defined here.
res\drawable\icon.png:0: error: Resource entry icon is already defined.
res\drawable\icon.jpg:0: Originally defined here.


  DONE
PH_5 Android BuildAPK.....
Rebuild Data
C:\Data\HyperNext\Tenerife>cd "C:\Android\android-sdk\tools\tools\"

C:\Android\android-sdk\tools\tools>apkbuilder "C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\dist\Tenerife.apk" -u -z "C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\bin\Tenerife.ap_" -f "C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\bin\classes.dex"

Rebuild Data
THIS TOOL IS DEPRECATED. See --help for more information.


Rebuild Data java.io.FileNotFoundException: C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\bin\Tenerife.ap_ does not exist


  DONE
PH_6 Android_SignAPK .....TYPE:---   debug.keystore
Debug Key
C:\Data\HyperNext\Tenerife>cd "C:\Program Files (x86)\Java\jdk1.6.0_33\bin\"

C:\Program Files (x86)\Java\jdk1.6.0_33\bin>jarsigner -J-Duser.language=en -keystore "C:\Users\Emma\AppData\Roaming\HAC_Data\data\debug.keystore" "C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\dist\Tenerife.apk" androiddebugkey

Debug Key Enter Passphrase for keystore: jarsigner: unable to open jar file: C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\dist\Tenerife.apk

Debug Data
  DONE
PH_7 Android_SignVerifyAPK .....-
C:\Data\HyperNext\Tenerife>cd "C:\Program Files (x86)\Java\jdk1.6.0_33\bin\"

C:\Program Files (x86)\Java\jdk1.6.0_33\bin>jarsigner -J-Duser.language=en -verify  "C:\Users\Emma\AppData\Roaming\HAC_Data\data\HN_Runtime\dist\Tenerife.apk"
-
-jarsigner: java.util.zip.ZipException: error in opening zip file
-
shell jar verify failed

Malkom

  • Administrator
  • Sr. Member
  • *****
  • Posts: 289
Re: Error messages when building Android project
« Reply #1 on: July 02, 2012, 08:02:13 AM »
Hello

Thank you for including the Log output in your post.

Have you managed to get any of the demo projects working, eg Hello World ?

This morning I installed Java, Quicktime and then HAC on a newly installed version of Windows 7 x64,  and within 10 minutes had Hello World running on a tablet.

About Java - did you use the 32 bit version of Java 6 JDK from here:-
http://www.oracle.com/technetwork/java/javase/downloads/index.html

In the log listing it complains about an image called icon.jpg which clashes with icon.png that HAC uses - perhaps you have an image called  icon.jpg in your project?
Android ignores the file extensions of files in the assets folder so first name clashes can occur.

The log listing also shows an issue with Version Code - in your project's My Application settings. Is your version code an integer?


I hope this helps.

Malkom
I am sorry but I do not have time to answer questions by PM or email.
If you post your questions in this forum then it might help others.

Malkom

  • Administrator
  • Sr. Member
  • *****
  • Posts: 289
Re: Error messages when building Android project
« Reply #2 on: July 04, 2012, 06:12:02 AM »
Hi

Thank you very much for your quick reply.

The icon.jpg / icon.png issue was the cause of the problem.  Made sure that duplicate file names disregarding extension did not exist and it worked.  Thanks a lot!!

Regards
Pål
I am sorry but I do not have time to answer questions by PM or email.
If you post your questions in this forum then it might help others.

rbbetecc

  • Newbie
  • *
  • Posts: 3
Re: Error messages when building Android project
« Reply #3 on: January 17, 2013, 03:24:42 PM »
Hi,

I have a similar problem here. I started to run the database application (delivered sample application) and after some seconds I got the logfile with the message that a "jarsigner" seems to be missing. Nothing was changed from my side in the database app.

Any idea?
Thx
Richard

Logfile is attached to this post (due to character limitations)

Malkom

  • Administrator
  • Sr. Member
  • *****
  • Posts: 289
Re: Error messages when building Android project
« Reply #4 on: January 17, 2013, 08:48:16 PM »
Hi Richard

Thank you for the log file it has helped a lot.

There seems to be a problem in Phase 6 of the build - it should change directory into the Java bin directory

for example on my dev machine:-

cd "C:\Program Files\Java\jdk1.6.0_21\bin\"

However, in your log file this step simply gives

cd ""

as if the Java directory is not specified in HAC's path preferences.


You can check that HAC's path prefs are set correctly via the HAC menu Android with option Android Paths


I hope this helps

Malkom


I am sorry but I do not have time to answer questions by PM or email.
If you post your questions in this forum then it might help others.

rbbetecc

  • Newbie
  • *
  • Posts: 3
Re: Error messages when building Android project
« Reply #5 on: January 18, 2013, 10:56:05 AM »
Hi Malkom,

I set the path to my SDK manually and it seems to be working. At least this part. Many thanks for your help.

But when I am launching the Emulator, starting ADB and press Run Android - nothing happens. I started the Hypernext Creator also with administration rights but the emulator is doing nothing. The emulator itself is working so I can select apps etc.

The sample application e.g. HelloWorld Landscape is not running (also nowhere visible on the emulator device). I checked the devices, seems ok.

Any idea?

Many thanks
Richard

Malkom

  • Administrator
  • Sr. Member
  • *****
  • Posts: 289
Re: Error messages when building Android project
« Reply #6 on: January 18, 2013, 12:14:05 PM »
Hi Malkom,

I set the path to my SDK manually and it seems to be working. At least this part. Many thanks for your help.

But when I am launching the Emulator, starting ADB and press Run Android - nothing happens. I started the Hypernext Creator also with administration rights but the emulator is doing nothing. The emulator itself is working so I can select apps etc.

The sample application e.g. HelloWorld Landscape is not running (also nowhere visible on the emulator device). I checked the devices, seems ok.

Any idea?

Many thanks
Richard
Hi Richard

Thats good news you got Java path working.

About the Hello World app not working. I'm not sure if you are using the DDMS debugger as it gives a lot of info on the installation progress and running of apps.
If not, it can be run from the HAC's Go menu - option Debugger DDMS

About the emulators. The one supplied with the HAC Easy Installer works quite well but we have found the later emulators struggle even on fast PCs. By struggle, I mean that sometimes they do not respond first time to installing a HAC app on them and this shows up in the DDMS activity log. Normally with the emulators I have DDMS working and only try to install/run an app on the emulator when DDMS shows the emulator is idling.

I hope this helps.

Malkom
I am sorry but I do not have time to answer questions by PM or email.
If you post your questions in this forum then it might help others.

rbbetecc

  • Newbie
  • *
  • Posts: 3
Re: Error messages when building Android project
« Reply #7 on: January 19, 2013, 02:14:54 PM »
Hi Malcom,

I tried several scenarios on two different computers. It is always the same. The emulator does not recognize the application or it is not going to be installed there. DDMS has been started and I have attached the logfile to this post.

Is it possible to build the app and copy/paste it into the emulator folder (location) manually?

Thx in advance
Richard