我在数独上创建了一个简单的android应用程序。有一天,我发现我的APK文件不见了。有没有办法恢复它?我尝试过“从本地历史重新存储”,“更改依赖项和所有可能的解决方案,我可以从所有博客中找到这些解决方案,但没有用。有人能为此提供解决方案吗?当我查看我的日志时,我发现的唯一错误是”未找到处理意图的活动{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)
发布于 2013-05-30 15:39:15
如果生成工具已更新,请检查SDK管理器。
发布于 2013-05-30 15:41:45
我不确定.But我认为您可能必须删除以下导入。
import org.example.sudoku.R;
然后,再次运行。
发布于 2018-08-23 03:44:56
再试着重建你的apk,也许会有帮助。在android studio的菜单中,搜索"Build“,然后搜索"BUILD APk(s)”。它将再次创建一个apk文件
https://stackoverflow.com/questions/16830254
复制相似问题