Wednesday, August 22, 2012

Eclipse CDT Launch failed Binary not found

(1)Build before Run
You must build before run, otherwise there would be no binary to run.
But you can set up auto build, so that you can build and run by one click.

(2)If you are moving projects to another platform
Select the correct tool chain in C/C++ Build > Tool Chain editor
Select the correct binary parser in C/C++ Build->Settings->Binary Parsers
Set up a correct build configuration in C/C++ Build > Manage Configurations

(3)Another case is "supporting Mach-O 64 Parser"...

Friday, August 17, 2012

How to set Eclipse CDT Auto Build

How to set Eclipse CDT Auto Build?
First, Situee choose auto build at Eclipse menu, but it doesn't work.
When run, still "Launch failed. Binary not found."

Go to Project properties > C/C++ Build > Behavior > Workbench build type

Import Eclipse CDT project from Windows to Mac

I built a Eclipse CDT project on Windows. Then want to work on Mac, too.
But it's quite difficult to migrate to Mac.
Try to run, and "Launch failed.Binary not found."

1. Change the "Binary Parser"

Sunday, November 20, 2011

Resolution Qualifier of Layout Drawable for Android

It's hard to differentiate 800x480 854x480 resolutions. 
Most mobile phones are of these two resolution and goes to qualifier "-normal-hdpi". Both are "-long"
There is resolution qualifier, thougth it's deprecated and recommended to not be used.
something like "-800x400"  "-854x480" (situee's blog)

Thursday, November 17, 2011

ThunderBird Shortcuts 雷鸟快捷键

Using shortcuts help save time. Save your time when dealing with EMAILs.

New message (default format) Command + N
Go to Next Unread Message N
Reply to Message (sender only)(default format) Command + R
Reply to All in Message (all recipients)(default format) Command + Shift + R
Send Message Now Command + Return

Wednesday, November 16, 2011

GalaxyTab, Motorola Xoom Screen Desity and Size

Galaxy Tab (7") is 170dpi, it is close to 160dpi, and should be mdpi . However, it is declared as "hdpi" and "large" by Samsung, because it's look better with a hdpi configuration. The new GalaxyTab 10.1 is the same size and resolution as Motorola Xoom, it should be mdpi and xlarge.(situee's blog)

-->
(situee's blog)

Density Screen Size Resolution
Samsung GalaxyTab 7 hdpi 7" large 1024 x 600
Motorola Xoom mdpi 10.1" xlarge 1280 x 800

Pre-scaling, Auto-Scaling and Screen Density

Designing android layout for multiple screens is really confusing.

Pre-scaling

Pre-scaling resource is an important concept.
If resources are not available in the correct density, the system loads the default resources and scales them up or down as needed to match the current screen's density.

Examples:
for an hdpi device, when there is only mdpi image 100x100, then the image will be pre-scaled to 150x150;
for an mdpi device, when there is only hdpi image 150x150, then the image will be pre-scaled to 100x100;

Sunday, November 06, 2011

ERROR: Unknown command 'crunch'

I upgraded the Android ADT to version 15. Everything seems fine until I tried to run an app.

ERROR: Unknown command 'crunch'

Now, use the new Android SDK Manager to upgrade the Android SDK Tools. Then we can forget about the "crunch" problem.

Tuesday, September 13, 2011

dex2jar Decompile APK file

When I find difficult to do something on Android, I will decompile the APK file and try to learn from the messy java code. But anyway, you may really find something useful that help you out.

Let's see how to decompile. We need some tools to decompile. That is dex2jar. You can find it here. And jd-gui to view the jar as java files.


  1. uncompress the apk. On Windows, use winrar to open the apk and extract.
  2. run command "dex2jar.bat classes.dex", "classes.dex.dex2jar.jar" is generated.
  3. use jd-gui.exe to open jar file and view the java code.

Friday, September 09, 2011

Enable/Renew Team Provisioning Profile:*

There is a Team Provisioning Profile:* in Current Provisioning Profiles in iDP portal.
It's a Wildcard AppID. You don't need to create a AppID and download specified provisioning profile for that AppID. You can use any bundle name and test your app on device with the Team Provisioning Profile:*

Check that whether your certificate is in the certificate list of the Team Provisioning Profile.
If there is not, don't worry. It is managed by Xcode. You can enable it in your Xcode.