APK文件丢失

时间:2013-05-30 07:22:22

标签: android android-manifest

我在sudoku上创建了一个简单的android应用程序。 有一天,我发现我的APK文件丢失了。 无论如何都要以任何方式恢复它? 我已经尝试过从本地历史记录中恢复,并且#34;更改依赖关系和所有可能的解决方案,我可以从所有博客中找到但没有用。 任何人都可以为此提出解决方案。 当我浏览我的logcat时,我能找到的唯一错误是"没有找到处理意图的活动{act = org.example.sudoku.about}

这是我的清单文件:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.example.sudoku"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="17" />

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme"
     >
    <activity
        android:name="org.example.sudoku.Sudoku"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:name="org.example.sudoku.About"
        android:label="@string/about_title"
        android:theme="@android:style/Theme.Dialog">


    <action android:name=".prefs" 
           android:label="@string/settings_title" />

    </activity>
</application>

</manifest>

这是我的about.java和about.xml文件     about.java

package org.example.sudoku;

import org.example.sudoku.R;
import android.app.Activity;
import android.os.Bundle;

public class About extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState)
{
    super.onCreate(savedInstanceState);
    setContentView(R.layout.about);
}
}

about.xml

<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >

<TextView 
    android:id="@+id/about_content"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="@string/about_text"/>

</ScrollView>

logcat的:

06-01 07:44:46.890: E/AndroidRuntime(930): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=org.example.sudoku.About }
06-01 07:44:46.890: E/AndroidRuntime(930):  at org.example.sudoku.Sudoku.onClick(Sudoku.java:36)

3 个答案:

答案 0 :(得分:0)

检查SDK Manager是否更新了Build Tools。

答案 1 :(得分:0)

我不确定。但我认为您可能必须删除以下导入。

import org.example.sudoku.R;

然后,再次跑。

答案 2 :(得分:0)

尝试重新构建apk可能会有所帮助。 转到android studio中的菜单,搜索“构建”,然后搜索“内置APk”。 它将再次创建一个apk文件