Unity出安卓包 申请了 精确定位的权限
android.permission.ACCESS_FINE_LOCATION android.hardware.location.gps android.hardware.location
有一点莫名其妙,明明把代码中的 有定位、 GPS相关代码都删除掉了,还在申请权限
找了半天,去了官网
才弄明白是这个Xlua 导出代码的时候 Input用到
Input.location
注释掉下面代码即可。
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_location(RealStatePtr L)
{
try {
//去掉定位权限
//ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
//translator.Push(L, UnityEngine.Input.location);
}
catch (System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}