现在,我正在尝试修改android packages\apps\Contacts 中有关联系人部分的原始代码。我的编译环境是eclpise + JDK1.7 + WIN7 (64)+AndroidSDK(2.3.3) 编译的程序是正确的,但是模拟器运行出错。
控制台:
[2012-09-16 15:14:46 - com.android.contacts.DialtactsActivity] WARNING: Application does not specify an API level requirement!
[2012-09-16 15:14:46 - com.android.contacts.DialtactsActivity] Device API version is 10 (Android 2.3.6)
[2012-09-16 15:14:46 - com.android.contacts.DialtactsActivity] Uploading com.android.contacts.DialtactsActivity.apk onto device 'emulator-5554'
[2012-09-16 15:14:48 - com.android.contacts.DialtactsActivity] Installing com.android.contacts.DialtactsActivity.apk...
[2012-09-16 15:14:56 - com.android.contacts.DialtactsActivity] Installation error: INSTALL_FAILED_SHARED_USER_INCOMPATIBLE
[2012-09-16 15:14:56 - com.android.contacts.DialtactsActivity] Please check logcat output for more details.
[2012-09-16 15:14:57 - com.android.contacts.DialtactsActivity] Launch canceled!
Bellow Logcat 错误:包 com.android.contacts 没有与共享用户 android.uid.phone 中的签名匹配的签名;无视!
从网上得到解决方案,我摆脱了代码
" android:sharedUserId="android.uid.shared"
android:sharedUserLabel="@string/sharedUserLabel" " in AndroidManifest.xml.
那没问题。
但是有一个新的错误。
"Could not find class 'com.android.phone.CallLogAsync', referenced from method com.android.contacts.TwelveKeyDialer.<init>"
"Could not find class 'com.android.phone.CallLogAsync$GetLastOutgoingCallArgs', referenced from method com.android.contacts.TwelveKeyDialer.queryLastOutgoingCall"
运行是错误的。我没有解决办法。你能给我一些指导建议吗?