80,351
社区成员
发帖
与我相关
我的任务
分享
我现在要把我的一个安卓程序打包为jar文件,安卓程序是可以运行的并且可以跑起来,
> //
> // final TelephonyManager tm = ( TelephonyManager ) getBaseContext (). getSystemService ( Context . TELEPHONY_SERVICE );
> // final String tmDevice , tmSerial , androidId ;
> // tmDevice = "" + tm . getDeviceId ();
> // tmSerial = "" + tm . getSimSerialNumber ();
> // androidId = "" + android . provider . Settings . Secure . getString ( getContentResolver (), android . provider . Settings . Secure . ANDROID_ID );
> // UUID deviceUuid = new UUID ( androidId . hashCode (), (( long ) tmDevice . hashCode () << 32 ) | tmSerial . hashCode ());
> // deviceId= deviceUuid . toString ();
>
就这个取安卓一id的代码,因为要继承activity才能实现获取uuid,但是我把它打包为jar后这个地方总是报错,我该怎么解决,求大侠指点。