1【已解決】依賴包后出現(xiàn)Failed to resolve:com.github.xxx錯誤
2 allprojects maven { url "https://jitpack.io" }
Q:Program type already present: android.support.design.widget.CoordinatorLayout$Behavior
A:implementation 'com.android.support:design:28.0.0'
====================================================================================
Q:java.io.FileNotFoundException: : open failed: ENOENT (No such file or directory)
A:升級API到29(x)
Q:Attempt to invoke virtual method 'boolean androidx.fragment.app.FragmentManagerImpl.isDestroyed()' on a null object reference
A:注釋onDetach()回調(diào)坡垫,就ok了
====================================================================================
2020-01-02
Android Studio Git 上傳報錯Push rejected Push to origin/master was rejected
在terminal窗口中依次輸入命令:
git pull
git pull origin master
git pull origin master --allow-unrelated-histories
====================================================================================
-0726
使用Git下載指定分支命令為:git clone -b 分支名 倉庫地址
使用exclude關鍵字点弯,過濾指定版本依賴庫
http://www.reibang.com/p/137d49c00d08?utm_campaign=maleskine&utm_content=note&utm_medium=seo_notes
查看依賴關系
>gradlew app:dependencies
==為空包簽名
jarsigner -verbose -keystore H:\qm\qxll.jks -signedjar H:\Work3\signed.apk H:\Work3\tap_unsign.apk qxll
http://www.reibang.com/p/b8ea9e40d9e2
====================================================================================
//所上傳的簽名包包名必須同所下載的空白包
com.bjstsd.ballstarproject
jarsigner -verbose -keystore qxll.jks -signedjar signed.apk tap_unsign.apk qxll
====================================================================================
C:\Windows\System32\drivers\etc\hosts
ipconfig/flushdns
====================================================================================
Q:ERROR: Failed to resolve: support-media-compat
A:修改project gradle 和gradle version
愛學啊
Ctrl+Alt+F //將局部變量變成全局變量
====================================================================================
--0812
編程大佬的囑咐
早日讓自己的代碼谋梭,健壯褪测、高效、具有良好的可擴展性
====================================================================================
--0813
Fragemnt的各種用法
Q:解決"requested upstream branch 'origin/master' does not exist"
A:總結(jié)一下:本地倉庫有文件忿晕,遠程倉庫也有文件凡恍,正確姿勢:
1润脸,git remote add origin 遠程倉庫地址
2,git pull origin master --allow-unrelated-histories
3倔矾,git branch --set-upstream-to=origin/master master
4,git push
原文鏈接:https://blog.csdn.net/jack22001/article/details/87946037
Q:Glide Exception:"You must not call setTag() on a view Glide is targeting"
A:
1.在res\values\目錄下創(chuàng)建ids.xml
并添加以下代碼:
<?xml version="1.0" encoding="utf-8"?>
<resources>
? ? <item type="id" name="tag_glide" />
</resources>
2.在Application的onCreate方法中添加:ViewTarget.setTagId(R.id.tag_glide);
原文:https://blog.csdn.net/yuangudashen/article/details/75287670#commentBox
Q:碼云打不開破讨,怎么辦丛晦?
A:
第一步:
找到hosts文件,文件目錄:C:\Windows\System32\drivers\etc
部分電腦該目錄下可能沒有hosts文件提陶,可以從其他電腦拷一份過來烫沙。如果提示無法修改,請使用管理員權限打開文件隙笆。
第二步:
修改hosts锌蓄,添加內(nèi)容:212.64.62.174 gitee.com
第三步:
瀏覽器打開碼云官網(wǎng):gitee.com升筏,刷新,搞定瘸爽!
原文地址:https://blog.ccswust.org/10731.html
====================================================================================
====================================================================================
Android 解決Android studio4.1.1不適配ButterKnife的問題
https://blog.csdn.net/weixin_46603990/article/details/111380229
Q:android.system.ErrnoException: open failed: EACCES (Permission denied)
A:android:requestLegacyExternalStorage="true"
Q:Gradle官方下載地址
A:https://services.gradle.org/distributions/
Q:jcenter()
A:maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
Q:【Android Studio】Gradle download:kotlin-compiler-embeddable-xx.jar下載太慢或者失敗解決辦法
A:Maven官方下載地址: https://mvnrepository.com/
Q:Plugin Error: Plugin "GsonFormat" is incompatible (supported only in IntelliJ IDEA).
A:刪除文件
Q:Android studio 下載依賴jar包慢
A:在.gradle文件夾下新建init.gradle文件您访,寫入:
allprojects{
? ? repositories {
? ? ? ? def REPOSITORY_URL = 'http://maven.aliyun.com/nexus/content/groups/public/'
? ? ? ? all { ArtifactRepository repo ->
? ? ? ? ? ? if(repo instanceof MavenArtifactRepository){
? ? ? ? ? ? ? ? def url = repo.url.toString()
? ? ? ? ? ? ? ? if (url.startsWith('https://repo1.maven.org/maven2') || url.startsWith('https://jcenter.bintray.com/')) {
? ? ? ? ? ? ? ? ? ? remove repo
? ? ? ? ? ? ? ? }
? ? ? ? ? ? }
? ? ? ? }
? ? ? ? maven {
? ? ? ? ? ? url REPOSITORY_URL
? ? ? ? }
? ? }
}
src:https://www.cnblogs.com/Neroi/p/13275689.html
Q:Android Studio 4.1 版本 不適配butterknife的問題
1、方案一:刪除AppData\Roaming\Google\AndroidStudio4.1\plugins下面的插件剪决。更換插件Android-ButterKnife-Injections.jar灵汪,不用android-butterknife-zelezny.jar。
2柑潦、如果方案一不成功:更換安裝路徑享言,Android-ButterKnife-Injections.jar放在系統(tǒng)的安裝路徑下:D:\Android\androidstudio\plugins。重啟AS試試渗鬼。代碼也不白了览露。