我正和名为 parse sdk
的第三个政党合作,为Android平台提供一些pi。
我翻阅了这个,"https://www.parse.com/apps/quickstart#android/ existent" rel="nofollow">link ,试图为这个粗糙的板块做一些抽样研究。
但是在那链接上提到的所有螺旋体之后 我无法运行这个测试和机器人应用。
我正在追踪记录中的错误 。
我已经在 libs 文件夹中导入了.jar 文件, 这是我在工程根目录中创建的 。
守则:
package com.parse.starter;
import com.parse.Parse;
import com.parse.ParseObject;
import android.app.Activity;
import android.os.Bundle;
public class ParseStarterProjectActivity extends Activity {
/** Called when the activity is first created. */
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Parse.initialize(this, "ZVhSPsDKds8cerZ2jjDNXCpu332RHtix6Gp7YkDa", "poQXYifVzMd6haf56U5FQ13xeCxecdGippZeCMyVO");
ParseObject testObject = new ParseObject("TestObject");
testObject.put("foo", "bar");
testObject.saveInBackground();
setContentView(R.layout.main);
}
}
错误日志 :
05-27 17:16:47.200: W/dalvikvm(468): threadid=1: thread exiting with uncaught exception (group=0x40015560)
05-27 17:16:47.210: E/AndroidRuntime(468): FATAL EXCEPTION: main
05-27 17:16:47.210: E/AndroidRuntime(468): java.lang.NoClassDefFoundError: com.parse.ParseObject
05-27 17:16:47.210: E/AndroidRuntime(468): at com.parse.starter.ParseStarterProjectActivity.onCreate(ParseStarterProjectActivity.java:14)
05-27 17:16:47.210: E/AndroidRuntime(468): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
05-27 17:16:47.210: E/AndroidRuntime(468): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
05-27 17:16:47.210: E/AndroidRuntime(468): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
05-27 17:16:47.210: E/AndroidRuntime(468): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
05-27 17:16:47.210: E/AndroidRuntime(468): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
05-27 17:16:47.210: E/AndroidRuntime(468): at android.os.Handler.dispatchMessage(Handler.java:99)
05-27 17:16:47.210: E/AndroidRuntime(468): at android.os.Looper.loop(Looper.java:123)
05-27 17:16:47.210: E/AndroidRuntime(468): at android.app.ActivityThread.main(ActivityThread.java:3683)
05-27 17:16:47.210: E/AndroidRuntime(468): at java.lang.reflect.Method.invokeNative(Native Method)
05-27 17:16:47.210: E/AndroidRuntime(468): at java.lang.reflect.Method.invoke(Method.java:507)
05-27 17:16:47.210: E/AndroidRuntime(468): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
05-27 17:16:47.210: E/AndroidRuntime(468): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
05-27 17:16:47.210: E/AndroidRuntime(468): at dalvik.system.NativeStart.main(Native Method)
编辑 :
根据Choop的评论。
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry kind="lib" path="libs/Parse-1.0.19.jar"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>