簡體   English   中英

ActivityNotFoundException:無法找到顯式活動類GoogleDriveProxeyActivity是否已聲明此內容

[英]ActivityNotFoundException: Unable to find explicit activity class GoogleDriveProxeyActivity have you declared this

我試圖從另一個活動中調用一個活動。

但我得到這個錯誤:

Unable to find explicit activity class GoogleDriveProxeyActivity have you declared this activity in your AndroidManifest.xml

執行時:

    private Uri saveFileToDrive() {
        Intent i = new Intent(this, GoogleDriveProxeyActivity.class);
                startActivityForResult(i, SAVE_TO_DRIVE);

                //btw, how does this work if another action started?
                return null;
          }

(//順便說一句,如果另一個動作啟動,startActivityForResult后如何發送返回值?)

我在清單中缺少什么?

    </activity>
            <activity
        android:name=".GoogleDriveProxeyActivity" >
        <intent-filter>
                            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>

更新

我的清單包:

de.vogella.android.todos/AndroidManifest.xml

有問題的活動:

package de.vogella.android.todos.contentprovider;

public class GoogleDriveProxeyActivity extends Activity {

嘗試使用您的活動的全名,包括命名空間:

<activity
    android:name="com.sample.GoogleDriveProxeyActivity" >
    ...
</activity>

在課堂上添加[Activity]例如;

[Activity]
class MyActivityClass : Activity
{
}

嘗試“重建項目”。 除非重建項目,否則有時無法檢測到清單文件更改。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM