我是 Oracle 数据库移动服务器的新手。遵循此处和此处的官方教程和文档。我从这里下载了 Oracle Mobile 服务器。按照教程,
- 我安装了MDK
- 从目录中打开示例项目
<MDK_ROOT>\Mobile\Sdk\samples\Sync\android\simple_sync_android
- 并完成了 Java Build Path 练习
- eclipse中没有出现错误。
- 然后我选择了
RUN AS -> Android application
这显示了模拟器和控制台显示成功安装......到目前为止一切都很好。
10-13 11:58:07.588: E/AndroidRuntime(654): FATAL EXCEPTION: main
10-13 11:58:07.588: E/AndroidRuntime(654): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{tests.sync/tests.sync.MainAct}: java.lang.ClassNotFoundException: tests.sync.MainAct
10-13 11:58:07.588: E/AndroidRuntime(654): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1983)
10-13 11:58:07.588: E/AndroidRuntime(654): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
10-13 11:58:07.588: E/AndroidRuntime(654): at android.app.ActivityThread.access$600(ActivityThread.java:130)
10-13 11:58:07.588: E/AndroidRuntime(654): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
10-13 11:58:07.588: E/AndroidRuntime(654): at android.os.Handler.dispatchMessage(Handler.java:99)
10-13 11:58:07.588: E/AndroidRuntime(654): at android.os.Looper.loop(Looper.java:137)
10-13 11:58:07.588: E/AndroidRuntime(654): at android.app.ActivityThread.main(ActivityThread.java:4745)
10-13 11:58:07.588: E/AndroidRuntime(654): at java.lang.reflect.Method.invokeNative(Native Method)
10-13 11:58:07.588: E/AndroidRuntime(654): at java.lang.reflect.Method.invoke(Method.java:511)
10-13 11:58:07.588: E/AndroidRuntime(654): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
10-13 11:58:07.588: E/AndroidRuntime(654): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
10-13 11:58:07.588: E/AndroidRuntime(654): at dalvik.system.NativeStart.main(Native Method)
10-13 11:58:07.588: E/AndroidRuntime(654): Caused by: java.lang.ClassNotFoundException: tests.sync.MainAct
10-13 11:58:07.588: E/AndroidRuntime(654): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
10-13 11:58:07.588: E/AndroidRuntime(654): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
10-13 11:58:07.588: E/AndroidRuntime(654): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
10-13 11:58:07.588: E/AndroidRuntime(654): at android.app.Instrumentation.newActivity(Instrumentation.java:1053)
10-13 11:58:07.588: E/AndroidRuntime(654): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1974)
10-13 11:58:07.588: E/AndroidRuntime(654): ... 11 more
我检查了清单......这里是:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="tests.sync"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".MainAct"
android:label="@string/app_name"
android:configChanges="orientation" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".TextFileEditor"
android:label="@string/app_name"
android:configChanges="orientation" >
</activity>
<service android:name="oracle.opensync.syncagent.android.SyncAgentService"></service>
</application>
<uses-sdk android:minSdkVersion="3" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.BATTERY_STATS" />
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
</manifest>
我可以看到那里列出的所有活动(只有两个类从活动扩展,一个是启动器类型)。我在代码中什么也没做。它是从 Oracle 提供的。
我试图从 android 设备与我的 oracle 企业数据库建立无风险的数据连接。这将我引向 Oracle 数据库移动服务器。开始本身就卡在这里了。
欢迎各种建议和指导。