1. please check your APP ID correct and Version available
檢查Bugly產品項目中的產品類型, 安卓和IOS
2. 最后一句一定要加上,不然就會遇到 Cleartext HTTP traffic to android.bugly.qq.com not permitted
<application android:icon="@mipmap/app_icon" android:label="@string/app_name" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:debuggable="true" android:isGame="false" android:usesCleartextTraffic="true" >
3. 記得加上名字和版本號
BuglyAgent.ConfigDefault ("XXXX", Application.version, null, 0);
4. IOS 使用XUPoter的時候,Unityframework 丟失頭文件引用,引起編譯錯誤, 最簡單的方式,手動添加幾個文件夾的引用, 但是如果介入了CI流程,就需要做一些修改了
PBXBuildPhase.cs 中添加 PBXHeadersBuildPhase 類型
然后在按照其他幾個Phase的代碼,都復制黏貼一份。
這個XUPoter 的設計思路還是挺好玩的,不認識的就不序列化了,也不管你有用沒用(精彩)。
5. IOS 使用XUPorter的時候,生成的項目運行時報 Class BuglyAgent is implemented in both... 類似的錯誤, 大概的意思就是你引用了同一個framework兩次。
在 XCProject.AddFile 做一些修改, 讓主項目不要去引用Bugly.framework了
case "PBXFrameworksBuildPhase": foreach( KeyValuePair<string, PBXFrameworksBuildPhase> currentObject in frameworkBuildPhases ) { // 新增這個if判斷 if(filePath.Contains("Bugly/Bugly.framework") && !jumpMainProject) { jumpMainProject = true; continue; } Debug.Log($"Adding Framework links {filePath}"); BuildAddFile(fileReference,currentObject,weak); } if ( !string.IsNullOrEmpty( absPath ) && ( tree.CompareTo( "SOURCE_ROOT" ) == 0 )) { string libraryPath = Path.Combine( "$(SRCROOT)", Path.GetDirectoryName( filePath ) ); if (File.Exists(absPath)) { this.AddLibrarySearchPaths( new PBXList( libraryPath ) ); } else { this.AddFrameworkSearchPaths( new PBXList( libraryPath ) ); } } break;