2014年9月30日 星期二

Android In App Billing Note


The Item that you were attempting to purchase could not be found, while download app from google play

1. check if the apk is uploaded and published aka 已發布 (even in Alpha stage)
    in Developer Console, the Apk , right up corner
2. check the SKU name
3. IAB need to test in REAL device (not virutal device like AVD)
4. the google account of the test device can not same as the Developer Console's account
5. the test apk should use same version number and same key to signed as the uploaded apk


Android Developer Tools 23.0 Export APK Error



When Exporting APK, there are 3 kinds of error when using ADT 23.0


1. duplicate id @+id/image already defined earlier in this layout

2. This class should be public (android.support.v7.internal.widget.ActionBarView.HomeView) : google-play-services_lib

3. "app_name" is not translated in af, am, ar, be, bg, ca, cs, da, de, el, en-rGB, en-rIN, es, es-rUS, et, et-rEE, fa, fi, fr, fr-rCA, hi, hr, hu, hy-rAM, in, it, iw, ja, ka-rGE, km-rKH, ko, lo-rLA, lt, lv, mn-rMN, ms, ms-rMY, nb, nl, pl, pt, pt-rBR, pt-rPT, ro, ru, sk, sl, sr, sv, sw, th, tl, tr, uk, vi, zh-rCN, zh-rHK, zh-rTW, zu

to fix that  Change Lint  FATAL to Warring
Window -> Preference -> Android -> Lint Error Checking

Correctness ->  DuplicateIds
Correctness ->  Instantiatable

Correctness:Messages -> Missing Translation

2014年9月24日 星期三

Laravel Installation in CentOS

1. Installl Composer Globally


https://getcomposer.org/doc/00-intro.md#downloading-the-composer-executable
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer


2. Install Laravel


* Required PHP 5.4
For upgrade PHP 5.3 to PHP 5.4

composer global require "laravel/installer=~1.1"


3. add ~/.composer/vendor/bin into $PATH



4. create a new laravel project which name is "test" in /var/www/html


cd /var/www/html
laravel new test


5. give  test/app/storage   write permission to apache




6. add a virtual host in httpd.conf

 
    ServerAdmin webmaster@example.com
    DocumentRoot /var/www/html/test/public
    ServerName laravel.example.com
    ErrorLog logs/laravel-error_log
    CustomLog logs/laravel-access_log common
           
                AllowOverride All
           




 7. browse  http://localhost/


It should display "You have arrived."


8. edit config files

app/config/app.php
'debug' => true,   //for debug message
'timezone' => 'Asia/Taipei',  //for timezone to Taipei

app/config/database.php


9. add a sample router

edit   app/router.php

Route::get('time', function()
{
    return date("Y-m-d H:i:s");
});

browse http://localhost/time






CentOS 6.5 Upgarde PHP 5.3.3 to PHP 5.4

https://webtatic.com/packages/php54/

1.
rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
2.
yum install yum-plugin-replace
 
yum replace php-common --replace-with=php54w-common
=============================================================================================================================================================================
 Package                                      Arch                                Version                                        Repository                             Size
=============================================================================================================================================================================
Installing:
 php54w                                       x86_64                              5.4.32-1.w6                                    webtatic                              2.5 M
 php54w-bcmath                                x86_64                              5.4.32-1.w6                                    webtatic                               34 k
 php54w-cli                                   x86_64                              5.4.32-1.w6                                    webtatic                              2.4 M
 php54w-common                                x86_64                              5.4.32-1.w6                                    webtatic                              1.1 M
 php54w-devel                                 x86_64                              5.4.32-1.w6                                    webtatic                              2.4 M
 php54w-gd                                    x86_64                              5.4.32-1.w6                                    webtatic                              118 k
 php54w-mbstring                              x86_64                              5.4.32-1.w6                                    webtatic                              918 k
 php54w-mcrypt                                x86_64                              5.4.32-1.w6                                    webtatic                               25 k
 php54w-mysql                                 x86_64                              5.4.32-1.w6                                    webtatic                              110 k
 php54w-pdo                                   x86_64                              5.4.32-1.w6                                    webtatic                               94 k
 php54w-pear                                  noarch                              1:1.9.4-7.w6                                   webtatic                              389 k
 php54w-tidy                                  x86_64                              5.4.32-1.w6                                    webtatic                               29 k
 php54w-xml                                   x86_64                              5.4.32-1.w6                                    webtatic                              145 k
Removing:
 php                                          x86_64                              5.3.3-27.el6_5.1                               @updates                              3.5 M
 php-bcmath                                   x86_64                              5.3.3-27.el6_5.1                               @updates                               29 k
 php-cli                                      x86_64                              5.3.3-27.el6_5.1                               @updates                              6.2 M
 php-common                                   x86_64                              5.3.3-27.el6_5.1                               @updates                              2.9 M
 php-devel                                    x86_64                              5.3.3-27.el6_5.1                               @updates                              3.0 M
 php-gd                                       x86_64                              5.3.3-27.el6_5.1                               @updates                              324 k
 php-mbstring                                 x86_64                              5.3.3-27.el6_5.1                               @updates                              2.1 M
 php-mcrypt                                   x86_64                              5.3.3-3.el6                                    @epel                                  46 k
 php-mysql                                    x86_64                              5.3.3-27.el6_5.1                               @updates                              216 k
 php-pdo                                      x86_64                              5.3.3-27.el6_5.1                               @updates                              168 k
 php-pear                                     noarch                              1:1.9.4-4.el6                                  @base                                 2.2 M
 php-tidy                                     x86_64                              5.3.3-27.el6_5.1                               @updates                               48 k
 php-xml                                      x86_64                              5.3.3-27.el6_5.1                               @updates                              307 k
Installing for dependencies:
 pcre-devel                                   x86_64                              7.8-6.el6                                      base                                  318 k
 t1lib                                        x86_64                              5.1.2-6.el6_2.1                                base                                  160 k

Transaction Summary
=============================================================================================================================================================================