Tuesday, February 12, 2013

[Howto] "Design Mode" greyed out in Blackberry 10 NDK

My environment:
Lenovo Thinkpad W510 + Windows xp + Blackberry 10 Native SDK 10.0.9 (Gold).

In the NDK, when I try to use Cascades, my "Design Mode" preview button was disabled and greyed out in QML Editing perspective.

There are some discussions here. I tried almost all the solutions in that thread, and would like to give out my version of solution, as follows.

1. Check if your Graphics Card had OpenGL 2.0 support. (Very likely, it is not a problem.)
2. Check if you have Jave. It says you need to have Java SE 6 Runtime Environment. (Very likely, it is not a problem, either.)
3. Then you can check the ".log" file in the ".metadata" folder of your workspace directory. Probably, you will find the line like


bb::cascades::QmlDocument: error when loading QML from:   QUrl( "file:///C:/TMP/previewTest.qml" )  
  --- errors:  (file:///C:/TMP/previewTest.qml: File name case mismatch) 

If so, you are having the same problem as I had.
I have temp directory in Environmental Variables as "C:\TMP".
But in my C drive, it is "C:\tmp".
The mismatch of uppercase and lowercase caused this problem.
The solution is to change the Environmental Variables to "C:\tmp".

Then you unselect "Disable QML Preview" in Blackberry 10 NDK -> Window -> Preferences -> Blackberry -> QML Editor.
Log off and log on to activate the new Environmental Variables.
Open your Blackberry 10 NDK again.
It will work.

It took me the whole afternoon to work on this stupid error. There are reasons why RIM is like what it is today.

No comments:

Post a Comment