編輯:初級開發
For example, if you have a IntentReceiver class name MyReceiver..
In androidManifest.XML
Error: MyReceiver does not extend android.context.BroadcastReceiver
In MyReceiver class defination
Error: Cannot resolve type IntentReceiver
Solution:
replace
import android.content.IntentReceiver;
public class MyReceiver extends IntentReceiver
{
@Override
public void onReceiveIntent(Context context, Intent intent)
{
}
public class MyReceiver extends BroadcastReceiver
}
Notes:
Detailed Problem Description:
replace@Overridewith
protected void onFreeze(Bundle outState) {
super.onFreeze(outState);
}
Solution:
@OverrideNotes:
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
}
Detailed Problem Description:
replacewith
Solution:
Notes:
Detailed Problem Description:
Error: Resource is not public..Solution:
Check the public resources @ docs/reference/android/package-summary.HtmlNotes:
Detailed Problem Description:
Some XML attributes are renamed, removed..and new attributes are added.Solution:
Use the new auto-complete feature in Eclipse for yourlayout.XML filesNotes:
Detailed Problem Description:
It is required to specify the unit of measurement for layout attributes.Solution:
Specify unit..Notes:
Detailed Problem Description:
You will notice the following errors while using MapVIEw:
1) ClassNotFound exceptions while using MapVIEw.
2) Java.lang.IllegalArgumentException: You need to specify an API Key for each MapVIEw
Solution:
For one, Maps API have now been moved into their own separate shared library.
Add the following tag to your androidManifest.XML to fix this issue:
<uses-library android:name="com.google.android.maps" />
Notes:
See ApiDemos -> view/MapVIEwDemo sample code.
Detailed Problem Description:
You will notice a signing error when you try to re-install ApiDemos for the first time.Solution:
Refer to:Notes:
Detailed Problem Description:
The LocationManager class does not fire Location update Intents. TheSolution:
The LocationManager class now notifIEs LocationListener objects of
location and status changes, rather than firing Intents. The
requestUpdates method has been renamed to requestLocationUpdates and
now takes a LocationListener object rather than an Intent. A new
requestStatusUpdates method has been added, also taking a
LocationListener object. The removeUpdates method now takes a
LocationListener object.
Notes:
For more information refer to:
http://code.google.com/android/toolbox/apis/lbs.Html
A sample app for using Location Apis can be found in the files section in
android-developer forums.
Detailed Problem Description:
You will notice that the Cursor.putXxx() methods and the Activity.managedCommitUpdates() are deprecated.Solution:
replace with calls to ContentResolver:
Notes:
See NoteEditor.Java in the NotePad sample for an example of usage.
Detailed Problem Description:
Solution:
with:
Notes:
Also, menu.add() methods now take new parameter "order"
Detailed Problem Description:
Solution:
with:
1) Bundle bundle = new Bundle();
bundle.putString(TEST_STRING, "Corky!");
Intent mIntent = new Intent();
mIntent.putExtras(bundle);
setResult(RESULT_OK, mIntent);
Android操作系統平台很容易跟Google其他應用如Google地圖的整合。在Android應用中,如果能在其中加入Google地圖,則會為你的應用增添強大的功能,
本人嘗試,裡面提供得軟件在索愛x8上失敗了 提示說不能網絡共享 。看來自己編譯x8迫在眉睫啊 (有幸下載到了x8得源代碼。。。)--------------------
冬天,北風吹著、雪花飄著,宅男宅女都窩在被窩裡不願出去,但是又想用電腦上個網,看看動漫、打打游戲啥的……鑽出被窩就意味著寒冷,待在被窩裡就意味著不能玩台式電腦……真的是
在搞個小字典的應用時候,有人提過,不能正常顯示音標問題,經過一番查找,發現是字體問題,android系統自帶的字體都不支持顯示音標,只能自己把支持音標顯示的字體加入項目