發表文章

目前顯示的是 11月, 2014的文章

悄悄的, 台灣new mac mini2014開賣了

圖片
悄悄的, 台灣new mac mini2014開賣了 http://store.apple.com/tw/buy-mac/mac-mini 連配件的價格都是一般PC配件價格兩倍以上.... 真的是一顆吸血蘋果.... 真想咒罵apple,對開發者這麼不友善... 不是每一個人都很有錢....   不得已之下,要開發Apple ios 應用程式 一定要有台真實mac, 再貴也得含淚買...... 含淚刷信用卡~~~

Android JNI- Add native support 不見了

圖片
當專案重新匯入時,經常遇到此問題, jni檔案不會自動去build. 然後執行時就發生 java.lang.UnsatisfiedLinkError: Couldn't load xxx-library from loader dalvik.system.PathClassLoader[ ... 很簡單 1.專案先關閉,在用記事本開啟.project 2.找到下列幾行,刪除紅字部分             com.android.ide.eclipse.adt.AndroidNature         org.eclipse.jdt.core.javanature         org.eclipse.cdt.core.cnature         org.eclipse.cdt.core.ccnature         org.eclipse.cdt.managedbuilder.core.managedBuildNature         org.eclipse.cdt.managedbuilder.core.ScannerConfigNature     3.重開eclipse,add native support就重新出現啦~

The Google Mobile Ads SDK is no longer available as a standalone SDK.

圖片
真是悲慘的消息,admob又改了...   Android 4.4後, The Google Mobile Ads SDK for Android is now a part of the Google Play services platform. It is no longer available as a standalone SDK . 所以出現紅字了... 不能compile了.... See the setup instructions and reference docs for details on setting up Google Play services. The Google Play services library supports even devices that don't have the Google Play store. To update such devices, download and bundle the latest Google Play services SDK; then relaunch your apps to propagate updates to your users. Devices that do have the Google Play store are automatically updated to the latest version. The Google Play services library does support publisher IDs from the legacy AdMob console, and is compatible with existing mediation adapters. 要用新方法~~

eclipse 密技: add java vm size

圖片
最近用eclipse compile app一直出現: Unable to execute dex: GC overhead limit exceeded GC overhead limit exceeded, 然後eclipse就當了. 這才發現eclipse有密技. 因為eclipse 是用java 寫的,不是native windows 程式,而是跑在java vm內. (一般windows native程式不會有這限制) 故JAVA VM限制了Eclipse的使用. 因此你的電腦就算有16GB RAM但沒做這隱藏設定也沒用. eclipse預設值是只有max 512MB的VM SIZE.這麼小的值. 平常時跑一跑小程式是沒問題啦, 但跑一跑大專案會當機也不足為奇了. 改了一下神奇的eclipse.ini. (改成紅字部分) openFile --launcher.XXMaxPermSize 512M -showsplash org.eclipse.platform --launcher.XXMaxPermSize 512m --launcher.defaultAction openFile --launcher.appendVmargs -vmargs -Dosgi.requiredJavaVersion=1.7 -Xms512m -Xmx1024m 馬上eclipse就回報MAX VM SIZE增加到949MB. (本來最大值只有500多MB) 尖峰值會衝到900多MB 故終於明白之前為何Eclipse會當了. 之前不知道,導致 eclipse跑超慢,怪電腦配備不佳.真是冤枉啊~ 這真的是隱藏設定,很多人用 eclipse很久都不知道... 但這大小要根據你電腦ram size決定, 設太大會吃掉你電腦ram memory, RAM 4GB建議設定在-Xms512m, -Xmx1024m RAM 8GB建議設定在 -Xms768m, -Xmx1536m RAM 16GB你就自己去旁邊偷笑驕傲炫耀一下,直接改2048MB吧,沒幾個人那麼有錢能買到16GB.. Eclipse應該要增加這設定這個在preference 內吧 , 要大家自己手動去修改增

如何才能測試in app billing?

圖片
這android in app billing 畫面只有設計app的人才可以看到, 但對開發者而言, 很不方便,我要如何才能測試in app billing? 因為內容發布者無法購買..... 所以要怎麼測試呢? 如何知道有沒有bug?

Eclipse 也可DEBUG JNI~

圖片
Enable NDK Debug to add build command NDK_DEBUG=1 at Eclipse -> Project -> Properties -> C/C++ Build  Eclipse -> Run -> Debug As -> -> Android Native Appliation set breakpoint at c/c++ source code. 但...有限制: 1.雖然可以看變數值 .但要自己手動增加到expression視窗, 很不方便,有時jni導致當機根本來不及看.... 2. Unfortunately, we can’t debug Java codes and Native code at the same time  Can’t select both Android Application and when debugging,好不幸~~~