原创 微信小程序開發測試appId如何改爲真正的appid

微信小程序開發測試appId改爲真正的appid 點擊  詳情——> APPID修改  改成正式appid 就可以了      

原创 簡單實現拖拽功能——懸浮窗效果

現在先看下效果: 實現: 自定義DragLayout 繼承 RelativeLayout: public class DragLayout extends RelativeLayout { private ViewDrag

原创 佈局文件:報警告 This inspection highlights unknown XML attributes in Android resource files and Andro...

新創建的項目,佈局文件報警告: This inspection highlights unknown XML attributes in Android resource files and AndroidManifest.xml 打開

原创 解決Android項目方法數超過64K 或者是超過 65536 問題

報錯信息如下: Error:The number of method references in a .dex file cannot exceed 64K. Learn how to resolve this issue at http

原创 android studio安裝apk時,vivo 部分手機出現 解析軟件包錯誤

AndroidStudio運行apk時,vivo部分手機出現   解析軟件包錯誤  提示,安裝失敗; 解決方法: Androidstudio  ——>  File   ——> Settings   ——>  Build,Execution

原创 canvas 調用方法在api28上報錯 :Invalid Region.Op - only INTERSECT and DIFFERENCE are allowed

錯誤日誌如下 報錯代碼是: canvas.clipRect(mClipBounds, Region.Op.UNION); 解決方法如下: if(Build.VERSION.SDK_INT >= 26){ canvas

原创 字母索引定位,仿聯繫人列表功能,實現字母A-Z排序

常見的聯繫人列表 A—Z排序功能,獲取數據首字母,仿照聯繫人實現A-Z字母排序,實現字母索引定位功能;監聽字母滑動,使recycleview滑動到指定位置; 先上效果圖: 下面介紹實現邏輯: 自定義 SideBar + Recyclev

原创 AndroidStudio 模擬器打不開 報錯: ERROR: x86_64 emulation currently requires hardware acceleration!

是因爲沒有下載 Inten x86 Emulator acceleration; 你會發現你的sdk所對應的目錄下沒有inten  文件夾: 所以導致打開不了模擬器: 解決辦法: 打開Settings——> Android SDK ——

原创 ButterKnife8.8.1 空指針問題

最近集成了下ButterKnife,出現了空指針問題 問題原因: 我在library module下進行的依賴如下: api "com.jakewharton:butterknife:8.8.1" annotationP

原创 解決NestedScrollView 佈局不能撐滿屏幕 的問題

最近使用  NestedScrollView   嵌套使其佈局超出屏幕時滑動; 想讓最後一個子佈局位於屏幕最底方; 各種方法都不行,後來發現NestedScrollView 的 子佈局不能撐滿整個屏幕,而是包裹內容,按照wrap_cont

原创 找不到org.apache.http.legacy解決辦法

錯誤信息如下:   找不到org.apache.http.legacy 這個類,是因爲Android 6.0不再支持 Apache HTTP client, 建議使用 HttpURLConnection 代替。 如果還想要繼續使用 Apa

原创 將舊項目導入AndroidStudio中所遇到的問題總結

最近將新項目導入3.0遇到了各種問題,一片爆紅,終於運行起來了!!!現在總結下,以便記錄: 1.首先修改 gradle 版本號:我的是 4.1  對應的項目中 build.gradle 中gradle爲3.0.0 2.Error:Fai

原创 解決Android7.x找不到libsqlite.so 問題

項目集成了環信,運行報錯如下: 就是找不到  libsqlite.so 這個so包!! 原因: 一般某些聊天的SDK都依賴於libsqlite.so(環信、融雲),不過由於這個包從來沒有變化,使用的是系統默認提供的(/system/li

原创 MagicIndicator 指示器使用時報Error(96,20) Failed to resolve: com.github.hackware1993:MagicIndicator:1.5.0

在AndroidStudio3.0使用MagicIndicator 指示器時 報錯 Error(96,20) Failed to resolve: com.github.hackware1993:MagicIndicator:1.5.0

原创 AsyncTaskCompat找不到,環信easeui集成的一些坑

錯誤提示: 環信的文檔寫的很簡單但是導入easeui後項目中就出問題了java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/os/AsyncT