網頁

2021年8月16日 星期一

使用Moya/RxSwift rx.request一直發生Error: Error calling

使用RxSwift時,一直出現Error: Error calling GetProfile()的錯誤訊息,GetProfile是我使用Moya做出來的enum值,查半天沒資料,後來發現拿掉disposed就正常了,發現Use the latest version of Moya/RxSwift to request the network interface to return an error message #1462有提及這狀況,不過看起來沒講什麼,似乎是這樣做會造成自我消除,記下來再觀察看看


參考網址:

Use the latest version of Moya/RxSwift to request the network interface to return an error message #1462

2021年8月3日 星期二

解決Windows Server的IE11無法下載chrome

 這幾天弄個新環境時發現用IE11點擊Chrome的下載連結怎樣都沒反應,查了半天,看到【茶包射手日記】無法下載 Chrome 的 IE才發現,被擋掉了,以前都只要去安全設定那邊處理就好,點擊了Server Manager,再找到"IE Enhanced Security Configuration"取消掉就能用了


參考網址:

【茶包射手日記】無法下載 Chrome 的 IE

2020年11月19日 星期四

解決Gradle DSL method not found: 'implementation()' 及 更換Android Studio Project的Android Gradle plugin version及Gradle Version

在想要加入新版billing library到舊專案時,一直遇到"Gradle DSL method not found: 'implementation()'"的問題,查了下看起來是Project中Gradle的版本問題, 更換方式如下:

對著app按右鍵選Open Module Settings


再點Project就可以選Android Gradle plugin version及Gradle Version


參考網址:

Gradle DSL method not found: 'implementation()'


2020年11月13日 星期五

解決Service Intent must be explicit

更改舊android專案升到api 28時,一直跳出Service Intent must be explicit,找半天解答,如:Service Intent must be explicit的解决方案【完美解决系列】Service Intent must be explicit,都太複雜,後來看到Google In-App billing, IllegalArgumentException: Service Intent must be explicit, after upgrading to Android L Dev Preview,才了解重點在Intent要設定Package字串,如,我在用的是"com.android.vending.billing.MarketBillingService.BIND",就設定intent.setPackage("com.android.vending"),這樣就OK了


參考網址:

Google In-App billing, IllegalArgumentException: Service Intent must be explicit, after upgrading to Android L Dev Preview

2020年11月6日 星期五

HttpClient won't import in Android Studio

在舊專案中在build.gradle中將compileSdkVersion及targetSdkVersion改成28後,突然出現import org.apache.http.HttpResponse有error,整個都沒了,google了下發現是因為sdk 23就不再包進去了,要另外加入底下的設定

android {
    useLibrary 'org.apache.http.legacy'
}

這樣就OK囉~

參考網址:

HttpClient won't import in Android Studio