在运行Google云端硬盘示例代码帮助时遇到了像dis一样的错误?
07-31 00:32:10.406: E/AndroidRuntime(784): java.lang.RuntimeException:
Unable to instantiate activity ComponentInfo{com.google.android.gms.drive.sample.quickstart/com.google.android.gms.drive.sample.quickstart.MainActivity}: java.lang.ClassNotFoundException: Didn't find class
"com.google.android.gms.drive.sample.quickstart.MainActivity" on path:
DexPathList[[zip file "/data/app/com.google.android.gms.drive.sample.quickstart-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.google.android.gms.drive.sample.quickstart-1, /system/lib]]
答案 0 :(得分:0)
请在AndroidManifest.xml
文件中加入活动
<activity android:name="com.google.android.gms.drive.sample.quickstart.MainActivity"/>
如果是启动器活动,请使用
<activity
android:name="com.google.android.gms.drive.sample.quickstart.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>