Can not generate bin directory and .prg file

Former Member
Former Member
I`m newer of ConnectIQ develop and I have done everything the "Getting Started" told me to do.
But my new project has no bin directory and no .prg file.


======================================================
BUILD: D:\java\bin\java -Dfile.encoding=UTF-8 -Dapple.awt.UIElement=true -jar "F:\garmin sdk\connectiq-sdk-win-2.2.4\bin\monkeybrains.jar" -o "E:\Garmin Projects\test2\bin\test2.prg" -w -y "E:\Garmin Projects\developer_key.der" -z "E:\Garmin Projects\test2\resources\drawables\drawables.xml";"E:\Garmin Projects\test2\resources\layouts\layout.xml";"E:\Garmin Projects\test2\resources\strings\strings.xml" -m "E:\Garmin Projects\test2\manifest.xml" "E:\Garmin Projects\test2\source\test2View.mc" "E:\Garmin Projects\test2\source\test2App.mc" -d square_watch_sim -s 2.2.0
BUILD: Complete
Aborting launch due to failed build.

This is the console when I try "run as connect iq App".

Someone help me please:o thanks!



This is my Eclipse project and you can see there is no bin directory....
  • Make sure the path to the SDK to a directory doesn't contain a space. i.e., change E:\Garmin Projects to E:\Garmin_Projects and try that.

    This problem has cropped up a few times in the past. I'm fairly certain it has been fixed, and then broken again. If that is the problem, you should post something to the Bug Reports forum about it.

    Travis
  • Former Member
    Former Member
    Make sure the path to the SDK to a directory doesn't contain a space. i.e., change E:\Garmin Projects to E:\Garmin_Projects and try that.

    This problem has cropped up a few times in the past. I'm fairly certain it has been fixed, and then broken again. If that is the problem, you should post something to the Bug Reports forum about it.

    Travis


    Thanks for your reply!

    I`ve tried what you said and changed the space to underline in the path but it seemed didn`t work...

    Anyway,thank you all the same!:o
  • when you don't use the square watch as target it 'll likely resolve your issue

    you might also want to check whether your dev env is setup correctly, it's part of my tutorial series: http://starttorun.info/garmin-connect-iq-setting-up-the-development-environment/
  • Former Member
    Former Member
    when you don't use the square watch as target it 'll likely resolve your issue

    you might also want to check whether your dev env is setup correctly, it's part of my tutorial series: http://starttorun.info/garmin-connect-iq-setting-up-the-development-environment/


    Thanks for your reply!

    I`ve tried you said but the target platforms didn`t change anything about my problem.

    what i`ve done is the same as your tutorial and the only difference is my eclipse version is Mars.2, maybe this is the point?
  • If PETERDECKER's suggestion didn't work, you might try removing the space in the path to the SDK (F:\garmin sdk). The path I suggested you fix above was the project file path, which may not be a problem.

    Or maybe I've just got spaces in paths on my mind and it doesn't really matter...

    Travis
  • Former Member
    Former Member
    If PETERDECKER's suggestion didn't work, you might try removing the space in the path to the SDK (F:\garmin sdk). The path I suggested you fix above was the project file path, which may not be a problem.

    Or maybe I've just got spaces in paths on my mind and it doesn't really matter...

    Travis


    I`ve already changed every space in the directory name I know...

    Now I`m trying to install Eclipse Neon even though I don`t think it`s the way to solve the problem...

    I found that the sample projects have no bin directory so I have another question is when are the bin directory and .prg files being generated?
  • Former Member
    Former Member
    Hey,

    I've run into similar issues in the past. When you go to Preferences>ConnectIQ does the SDK Root Directory path still show spaces even though you have changed that already? I changed mine on my personal development environment, but one of the Eclipse config files kept defaulting to the old directory path even after deleting and reinstalling Eclipse. I had to do some digging through some files to get rid of some unwanted settings to fix it.

    -Coleman
  • Former Member
    Former Member
    Hey,

    I've run into similar issue sin the past. When you go to Preferences>ConnectIQ does the SDK Root Directory path still show spaces even though you have changed that already? I changed mine on my personal development environment, but one of the Eclipse config files kept defaulting to the old directory path even after deleting and reinstalling Eclipse. I had to do some digging through some files to get rid of some unwanted settings to fix it.

    -Coleman


    Thanks for your reply!

    I'm very sure that my preferences settings are just working fine.


    Now I have another question that when are the bin directory and .prg files being generated cause I found that sample projects have no bin directory either.
  • I guess you maybe hitting this issue:

    https://forums.garmin.com/showthread.php?323554-quot-Aborting-launch-due-to-failed-build-quot-Message/page4

    I do not think it is resolved, I keep hitting it too, but have managed to work around it by removing comments and blank lines from my code. I initially hit this last week when I added a comment block into one file. I unwound the changes until it started working again, eventually working out it was simply to do with the comment added. When I added the same comment lower down the problem went away. Then it came back again when I added a new constant to the top of the file, but went away when I removed a blank line.

    Some people have said the problem goes away if you create a new project and copy in the same source, but that did not work for me. I guess maybe they omitted some blank lines or changed some other formatting and that caused the problem to go away. If you have blank lines or comments near the top of your source files I'd try removing them. That was the footprint for me. Of course you may be hitting something slightly different but I can only comment on my own experience.

    So, I'm pretty sure that this is a strange Connect IQ bug whereby it does not like something in the source file and fails to build, hence generating no prg file.
  • Former Member
    Former Member
    I guess you maybe hitting this issue:

    https://forums.garmin.com/showthread.php?323554-quot-Aborting-launch-due-to-failed-build-quot-Message/page4

    I do not think it is resolved, I keep hitting it too, but have managed to work around it by removing comments and blank lines from my code. I initially hit this last week when I added a comment block into one file. I unwound the changes until it started working again, eventually working out it was simply to do with the comment added. When I added the same comment lower down the problem went away. Then it came back again when I added a new constant to the top of the file, but went away when I removed a blank line.

    Some people have said the problem goes away if you create a new project and copy in the same source, but that did not work for me. I guess maybe they omitted some blank lines or changed some other formatting and that caused the problem to go away. If you have blank lines or comments near the top of your source files I'd try removing them. That was the footprint for me. Of course you may be hitting something slightly different but I can only comment on my own experience.

    So, I'm pretty sure that this is a strange Connect IQ bug whereby it does not like something in the source file and fails to build, hence generating no prg file.


    It works!!

    Thanks for your comments and the problem went away when I copy all the files in jre directory to java directory!

    The actual problem is ConnectIQ plugin got wrong java path!

    Thanks again!:o;):D