Android 与 Unity 的记录2018

/​​​​​​  ​查看libunity.so崩溃信息  //

函数调用栈,利用NDK 的 arm-linux-andr
oideabi-addr2line.exe  提供的命令行来手动查看 libunity.sym.so 的信息

bulgy 的so自动处理 的so是不带符号信息的,因此就算上传了so也是无法查看函数调用栈信息的,因此需要借助NDK查看 

android-ndk-r10e\android-ndk-r10e
\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin>

arm-linux-androideabi-addr2line -f -e libunity.sym.so 002de41

002de41 为函数地址

///

Curl error 6: Could not resolve host: cdp.cloud.unity3d.com
if(Application.internetReachability != NetworkReachability.NotReachable)
{
    DoUnityAnalitycsInternetWork();
}

1. Cleaned my GI cache.
2. Increase my GI cache to 24gb.
3. Restarted project, and everything was fine.
Simply put Unity wants you to be connected to the internet when you use their software just like everybody else. I'm not saying that the error may not return but I hope what I did help somebody out.

hwcomposer: WaitGpuAcquireFence:171: Sync wait 27185 over 6000 !   Screen.resolutions[0].refreshRate
ScreemCommon: 1、failed to recording jank bigdata of different frame rates 2、jank frame opt scene object is null
WificondControl:Noise: -92, Snr: 66, Chload: 45, rssi: -51, txBitrate: 173, rxBitrate: 0, frequency: 5300, UlDelay: -1, currentTxBytes: 426692783, 
HuaweiWifiWatchdogStateMachine:Get speed information rx_speed = 109 ,tx_speed = 4205 ,isSpeedOk = false ,mBestSpeedInPeriod = 109
PTcp RTT:884, rtt pkt=3, tcp_rx=0, tcp_tx=1, tcp_reTran=0, rtRate=0
rssi bad, mrssi=-50 < TargetRssi=-57
start computeQosLevel tcpRtt = 884 ,rssi = -50 ,mBestSpeedInPeriod = 109
WiFi_PRO_EvaluateController:NEBB1BAA39,crurrent Signal =  4, last  Signal = 4, isSemiAuto, last evaluate is Valid
HwWifiProServiceProxy:ctrlHwWifiNetwork pkgName: WIFIPRO_SERVICE interfaceId: 8
currentTxPackets: 1911018, currentTxFailed: 3, currentRxBytes: 522640918, currentRxPackets: 451423
TimeController:1、CAWARENESS: releaseMemory() totalPss : 19953  2、CAWARENESS: releaseMemory() release memory now
HwQoeQualityMonitor:rttTime=45808, rttPacketNum=114, tcpTxPacket=260, tcpRxPacket=240, tcpReSendPacket=0

System memory in use before: 0.70 GB.
InputTransport: history resample interval is too short, cannot uses it to resample!!

手机连接电脑Profiler,截图如下

wifi连接:要链接本地wifi,ip前三位,网段一致即电脑所在的网络和手机所在的网络在同一子网下。

adb连接:需要adb forward

tcp:34999 localabstract:Unity-{bundleIdentifier}

adb连接模拟器: adbconnect 127.0.0.1:62001


//************py 命令脚本*****************

#!/usr/bin/env python

import os

import sys

Cmd_kill = "adb kill-server"

Cmd_start = "adb start-server"

Cmd_connect = "adb connect127.0.0.1:62001"

Cmd_devices = "adb devices"

Cmd_profiler = "adb forward tcp:54999localabstract:Unity-com.xxxx.yyy"

def conn2Nox():

   os.system(Cmd_kill)

   os.system(Cmd_start)

   os.system(Cmd_connect)

   os.system(Cmd_devices)

   os.system(Cmd_profiler)

   os.system("pause")

   pass

def main():

   conn2Nox()

   pass

if __name__ == "__main__":

       main()

//************py 命令脚本*****************


Failed to connect to player ip:10.246.137.236

UnityEditorInternal.ProfilerDriver:DirectIPConnect(String)

UnityEditor.AttachProfilerUI:SelectProfilerClick(Object,String[], Int32)

Socket: connect failed, error: 无法立即完成一个非阻止性套接字操作。

(0)

UnityEditorInternal.ProfilerDriver:set_connectedProfiler(Int32)

UnityEditor.AttachProfilerUI:SelectProfilerClick(Object,String[], Int32)

Failed to connect to player ip: 10.246.137.236,port: 55173

UnityEditorInternal.ProfilerDriver:set_connectedProfiler(Int32)

UnityEditor.AttachProfilerUI:SelectProfilerClick(Object,String[], Int32)

查看所有的端口占用情况C:\>netstat -ano

查看指定端口的占用情况 C:\>netstat -aon|findstr "9050"

查看PID对应的进程 C:\>tasklist|findstr "2016"

结束该进程 C:\>taskkill /f /t /im tor.exe

1、根据端口号“80”查找进程号
netstat -ano|findstr "80"
TCP    0.0.0.0:80             0.0.0.0:0             LISTENING      7796
2、根据进程号“7796”查找进程名
tasklist|findstr 7796
java.exe                     7796 Console                   1     57,368 K
3、根据进程名杀死进程
taskkill /f /t /im java.exe
成功: 已终止 PID 7796 (属于 PID 9052 子进程)的进程。

TCP状态转移要点
    TCP协议规定,对于已经建立的连接,网络双方要进行四次握手才能成功断开连接,如果缺少了其中某个步骤,将会使连接处于假死状态,连接本身占用的资源不会被释放。网络服务器程序要同时管理大量连接,所以很有必要保证无用连接完全断开,否则大量僵死的连接会浪费许多服务器资源。在众多TCP状态中,最值得注意的状态有两个:CLOSE_WAIT和TIME_WAIT。  
 
1、LISTENING状态
  FTP服务启动后首先处于侦听(LISTENING)状态。

2、ESTABLISHED状态
  ESTABLISHED的意思是建立连接。表示两台机器正在通信。

3、CLOSE_WAIT

    对方主动关闭连接或者网络异常导致连接中断,这时我方的状态会变成CLOSE_WAIT 此时我方要调用close()来使得连接正确关闭

4、TIME_WAIT

    我方主动调用close()断开连接,收到对方确认后状态变为TIME_WAIT。TCP协议规定TIME_WAIT状态会一直持续2MSL(即两倍的分段最大生存期),以此来确保旧的连接状态不会对新连接产生影响。处于TIME_WAIT状态的连接占用的资源不会被内核释放,所以作为服务器,在可能的情况下,尽量不要主动断开连接,以减少TIME_WAIT状态造成的资源浪费。

    目前有一种避免TIME_WAIT资源浪费的方法,就是关闭socket的LINGER选项。但这种做法是TCP协议不推荐使用的,在某些情况下这个操作可能会带来错误。

手机连接FrameDebug :

Application.runInBackground = true;

CommandInvokationFailure: Failed to buildapk.

D:/MyWorkSoftwareFolder/AndroidUnityTools/jdkSource\bin\java.exe-Xmx2048M -Dcom.android.sdkmanager.toolsdir="D:/MyWorkSoftwareFolder/AndroidUnityTools/AndroidSDK\tools"-Dfile.encoding=UTF8 -jar"D:\MyWorkSoftwareFolder\Unity5.6.2\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar"-

stderr[

Exception in thread "main"java.lang.reflect.InvocationTargetException

         atjava.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

         atjava.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

         atjava.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

         atjava.base/java.lang.reflect.Method.invoke(Method.java:564)

         atSDKMain.main(SDKMain.java:130)

Caused by: java.lang.NoClassDefFoundError:sun/misc/BASE64Encoder

         atcom.android.sdklib.internal.build.SignedJarBuilder.<init>(SignedJarBuilder.java:177)

         atcom.android.sdklib.build.ApkBuilder.init(ApkBuilder.java:446)

         atcom.android.sdklib.build.ApkBuilder.<init>(ApkBuilder.java:422)

         atcom.android.sdklib.build.ApkBuilder.<init>(ApkBuilder.java:362)

         atUnityApkBuilder.<init>(UnityApkBuilder.java:214)

         atUnityApkBuilder.main(UnityApkBuilder.java:34)

         ...5 more

Caused by:java.lang.ClassNotFoundException: sun.misc.BASE64Encoder

         atjava.base/java.net.URLClassLoader.findClass(URLClassLoader.java:466)

         atjava.base/java.lang.ClassLoader.loadClass(ClassLoader.java:563)

         atjava.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)

         ...11 more

]

stdout[

]

exit code: 1

UnityEditor.Android.Command.Run(System.Diagnostics.ProcessStartInfo psi,UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit,System.String errorMsg)

UnityEditor.Android.AndroidSDKTools.RunCommandInternal(System.String javaExe, System.String sdkToolsDir, System.String[]sdkToolCommand, Int32 memoryMB, System.String workingdir,UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit,System.String errorMsg)

UnityEditor.Android.AndroidSDKTools.RunCommandSafe(System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand,Int32 memoryMB, System.String workingdir,UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit,System.String errorMsg)

UnityEditor.HostView:OnGUI()

Shader error in 'xxxxxx':'' :  non-square matrices not supported(3x1) at line 235 (on gles)

Compiling Vertex program with DIRECTIONAL_LIGHT_OFF _HIT_OFF

Platform defines: UNITY_NO_DXT5nmUNITY_NO_RGBM UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLEUNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 SHADER_API_MOBILEUNITY_HARDWARE_TIER3 UNITY_COLORSPACE_GAMMA

Shader error in 'xxxxxx':'tex2D' : cannot resolve function call unambiguously (check parameter types)'a' : vector field selection out of range at line 425 (on gles)

Compiling Vertex program with POINT_COOKIE

Platform defines: UNITY_NO_DXT5nmUNITY_NO_RGBM UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLEUNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 SHADER_API_MOBILEUNITY_HARDWARE_TIER2 UNITY_COLORSPACE_GAMMA

Shader error in 'xxxxxx':'tex2D': no matching 2 parameter intrinsic function; Possible intrinsicfunctions are: tex2D(sampler2D, float2|half2|min10float2|min16float2)tex2D(sampler2D, float2|half2|min10float2|min16float2, float2|half2|min10float2|min16float2,float2|half2|min10float2|min16float2) at line 425 (on gles3)

Compiling Vertex program with POINT_COOKIE

Platform defines: UNITY_NO_DXT5nmUNITY_NO_RGBM UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLEUNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF3 UNITY_NO_FULL_STANDARD_SHADERSHADER_API_MOBILE UNITY_HARDWARE_TIER1 UNITY_COLORSPACE_GAMMA

Shader error in 'xxxxxx':'tex2D': no matching 2 parameter intrinsic function; Possible intrinsicfunctions are: tex2D(sampler2D, float2|half2|min10float2|min16float2)tex2D(sampler2D, float2|half2|min10float2|min16float2,float2|half2|min10float2|min16float2, float2|half2|min10float2|min16float2) atline 425 (on vulkan)

Compiling Vertex program with POINT_COOKIE

Platform defines: UNITY_NO_DXT5nmUNITY_NO_RGBM UNITY_ENABLE_REFLECTION_BUFFERS UNITY_NO_SCREENSPACE_SHADOWSUNITY_PBS_USE_BRDF2 SHADER_API_MOBILE UNITY_HARDWARE_TIER3 UNITY_COLORSPACE_GAMMA

UMP is universal Media Framework plugin for Unity that based on Video LAN Codec (libVLC) native libraries. Support E-mail: unitydirectionkit@gmail.com Try: Demo (Win64) Demo (Mac64) Important: - Please read user manual before start use UMP; - For possibility to use external/installed VLC libraries you should install the regular VLC player (Unity 64-bit Editor == VLC player 64-bit); - Doesn't support Android & iOS platforms without UMP Pro (Android, iOS); - For correct work with UMP Pro (Android, iOS) package at first import UMP Pro (Android, iOS) package and after it import UMP Pro (Win, Mac, Linux) package in your project; Main features: + Included full C# source code; + Full compability with UMP Pro (Android, iOS); + Supported platforms: * Windows (x86, x86_64); * Mac (x86_64); * Linux (x86, x86_x64, Universal); * WebGL (experimantal) - supported media formats and browser compatibility Checked on next OS: Win - 7, 8, 8.1, 10; Mac - 10.10 Yosemite, 10.11 El Capitan; Linux - Ubuntu 16.04 LTS; WebGL - Firefox, Chrome. + Supported possibility to use external VLC libraries; + Supported possibility to easy switch subtitles (SPU) and audio tracks; + Supported Unity Audio Source component (only Win, Mac & Linux); + Supported transparent videos; + Supported possibility to get pixels of current video frame; + Supported video hosting services: * Youtube (don't support: everything private (private videos, bought movies, ...), don't support "Youtube Live Streams"); + Full compatibility with Unity Editor on supported platforms in different modes (fast native texture updates): Direct3D9, Direct3D11 and OpenGL; + Supported local video file playback, main formats (only for Win, Mac & Linux): 3GPP (.3gp), AVI (.avi), FLV (.flv), SWF (.swf), M4V (.m4v), Matroska (.mkv), Ogg Video (.ogg), QuickTime File Format (.mov, .qt), WebM (.webm), Windows Media Video (.wmv). + Supported main streaming media protocols (only for Win, Mac & Linux): HTTPS, HTTP, HLS, RTSP, RTMP.
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

警醒与鞭策

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值