2013年12月19日 星期四
2013年12月3日 星期二
github error
git push remote branch時出現
這是因為創建repo時選擇了建立readme
此時readme沒有和本機同步
所以必須先和remote同步
sol:
git remote add origin //your github url
//pull those changes
git pull origin master
//now, push your work to your new repo
git push origin master
git pull origin master時
error: Your local changes to the following files would be overwritten by merge:index.rtf必須先commitgit commit -m "index.rtf"git pull origin mastergit push origin master大功告成!
2013年7月1日 星期一
2013年6月26日 星期三
更新完google play servise 出現Android.r檔無法匯入
為了使用新的google map
必須裝新版的google service
裝完必須更新eclipse
最後要使用android tools ->add support library
解決
必須裝新版的google service
裝完必須更新eclipse
最後要使用android tools ->add support library
解決
2013年6月11日 星期二
zxing
library 用zxing2.1版本
1匯入project "android"
2把core裡面的core.jar放到上1步驟專案的 新建一個libs資料夾下 就沒有錯誤了
3.右鍵點專案選porperty -> android ->islibrary鉤起來
4.到自已專案 porperty-> android ->add library
5.記得把activity加入自己專案
6.Intent intent = new Intent(getActivity(),
CaptureActivity.class);
// Intent intent = new
// Intent("com.google.zxing.client.android.SCAN");
intent.putExtra("SCAN_MODE", "QR_CODE_MODE");
startActivityForResult(intent, 0);
//接收訊息
public void onActivityResult(int requestCode, int resultCode, Intent intent) {
Log.d("tf", "resultCode = " + resultCode);
if (requestCode == 0) {
if (resultCode == 1) {
// Handle successful scan
String capturedQrValue = intent.getStringExtra("RESULT");
//String format = intent.getStringExtra("SCAN_RESULT_FORMAT");
// Toast.makeText(FragQRCodeScan.this,"Scan Result:" + capturedQrValue, Toast.LENGTH_SHORT).show();
} else if (resultCode == 2) {
// Handle cancel
}
} else {
}
}
7.會呈90度翻轉 http://rritw.com/a/bianchengyuyan/C__/20130425/346558.html
更新ADT v22之後 fragment套件一直出現java.lang.ClassNotFoundException
http://stackoverflow.com/questions/16636039/java-lang-classnotfoundexception-after-changing-nothing-in-the-project-but-upgra/16636127#16636127
2013年6月10日 星期一
android AlertDialog.Builder listview 未整理 (夜市人生phone的ListViewAdapter_Frag_ShopBills.java)
//get data
//不同張訂單
AlertDialog.Builder builder = new AlertDialog.Builder(mActivity);
builder.setTitle("增加備註");
builder.setMultiChoiceItems(arr_ClassMemoName, arr_isClick, new OnMultiChoiceClickListener(){
@Override
public void onClick(DialogInterface dialog, int which,boolean isChecked) {
arr_isClick[which] = isChecked;
}
});
//按下確定
builder.setPositiveButton("確定",new DialogInterface.OnClickListener(){
public void onClick(DialogInterface arg0, int arg1) {
//增加備註
for(int i=0;i< arr_isClick.length;i++){
if(arr_isClick[i]==true){
list_SingleBills.get(position).list_ClassMemo.add(arr_ClassMemoID[i]);//把勾選備註加進來
int ClassMemoPrice = Integer.parseInt(list_ClassMemo.get(i).str_Price);//該個備註價錢
arr_i_productMemoPrice[position] += ClassMemoPrice;//加到總備註
}else{
//取消備註
// ArrayList temp_list_ClassMemo = list_SingleBills.get(position).list_ClassMemo;
for(int j = 0 ; j < list_SingleBills.get(position).list_ClassMemo.size() ; j++)
{
if(list_SingleBills.get(position).list_ClassMemo.get(j).equals(arr_ClassMemoID[i]))
{
list_SingleBills.get(position).list_ClassMemo.remove(j);
}
}
}
}
listViewAdapter_Frag_GoodsList.notifyDataSetChanged();//刷新自己
}
});
builder.setNegativeButton("取消",new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
dialog.cancel();
}
});
builder.show();
2013年6月9日 星期日
當listview裡面有button checkbox元件 onItemClick事件會失效
http://stackoverflow.com/questions/1518338/setonitemclicklistener-not-working-on-custom-listview-android
2013年1月23日 星期三
android overlap location another project
匯入檔案出現 overlap location another project
I have struggled with this issue myself for a while and I think the reason it happens is because (for Android) there are two ways to import projects into the workspace
1) import>General>Existing Project into Workspace
2) import>Android>Existing Code into Workspace
The errors described here are related to method 2).
For method 1) there will be no overlap problems as long as you uncheck the "Copy Projects into Workspace" box if the project is already in the workspace.
引用資料
http://stackoverflow.com/questions/5784652/eclipse-invalid-project-description-when-creating-new-project-from-existing-so
2013年1月22日 星期二
google map api key request website
https://developers.google.com/maps/documentation/android/v1/maps-api-signup?hl=zh-TW
新版
http://cheng-min-i-taiwan.blogspot.tw/2013/04/google-maps-android-api-v2-android.html
新版
http://cheng-min-i-taiwan.blogspot.tw/2013/04/google-maps-android-api-v2-android.html
2013年1月17日 星期四
訂閱:
文章 (Atom)