Android 7.0,用最新版的iMobile 8C for Android 初始化报错
Calling by::className:com.supermap.data.Environment MethodName:getMacAddress
java.io.FileNotFoundException: /sys/class/net/eth0/address (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:146)
at java.io.FileInputStream.<init>(FileInputStream.java:99)
at java.io.FileReader.<init>(FileReader.java:58)
at com.supermap.data.Environment.loadFileAsString(Environment.java:650)
at com.supermap.data.Environment.getMacAddress(Environment.java:639)
at com.supermap.data.Environment.checkDevice(Environment.java:579)
at com.supermap.data.Environment.initialization(Environment.java:523)
at cn.seismic.exploration.activity.MainActivity.initEnvironment(MainActivity.java:312)
at cn.seismic.exploration.activity.MainActivity.initMap(MainActivity.java:292)
at cn.seismic.exploration.activity.MainActivity.onCreate(MainActivity.java:283)
at android.app.Activity.performCreate(Activity.java:6910)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2746)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2864)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1567)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:156)
at android.app.ActivityThread.main(ActivityThread.java:6531)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:941)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:831)
loadFileAsString这个方法报错,追溯到
return loadFileAsString("/sys/class/net/eth0/address").toUpperCase().substring(0, 17);
就正如报错找不到里面的文件,是读写权限的原因吗?动态获取了读写权限把证书写入设备的,再读取的证书啊,也就是其他权限的原因,但超图需要的权限都是加了的,都赋予了动态权限,不知道是哪个权限还是什么其他问题,求解答,急,谢谢!