首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >APK文件丢失

APK文件丢失
EN

Stack Overflow用户
提问于 2013-05-30 15:22:22
回答 3查看 3K关注 0票数 0

我在数独上创建了一个简单的android应用程序。有一天,我发现我的APK文件不见了。有没有办法恢复它?我尝试过“从本地历史重新存储”,“更改依赖项和所有可能的解决方案,我可以从所有博客中找到这些解决方案,但没有用。有人能为此提供解决方案吗?当我查看我的日志时,我发现的唯一错误是”未找到处理意图的活动{act=org.example.sudoku.about}

这是我的清单文件:

代码语言:javascript
复制
<?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

代码语言:javascript
复制
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

代码语言:javascript
复制
<?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:

代码语言:javascript
复制
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)
EN

回答 3

Stack Overflow用户

发布于 2013-05-30 15:39:15

如果生成工具已更新,请检查SDK管理器。

票数 0
EN

Stack Overflow用户

发布于 2013-05-30 15:41:45

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

代码语言:javascript
复制
import org.example.sudoku.R;

然后,再次运行。

票数 0
EN

Stack Overflow用户

发布于 2018-08-23 03:44:56

再试着重建你的apk,也许会有帮助。在android studio的菜单中,搜索"Build“,然后搜索"BUILD APk(s)”。它将再次创建一个apk文件

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/16830254

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档