2013-05-30 85 views
0

我正在创建一个简单的android应用程序在sudoku上。 有一天,我发现我的APK文件丢失了。 无论如何要以任何方式恢复它? 我试图“从本地历史retore”,“改变依赖和所有可能的解决方案,我可以从所有的博客,但没有用找到的。 任何人都可以提出一个解决方案。 当我通过我的logcat唯一的错误去我能找到的是“无活动处理意向{行动= org.example.sudoku.about}APK文件缺失

这里是我的清单文件:

<?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 files 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) 

回答

0

检查您的SDK管理器中,如果生成工具进行更新。

+0

:是更新 –

+0

删除此导入并重建 import org.example.sudoku.R; – user1283633

0

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

import org.example.sudoku.R; 

然后,再次运行。

+0

我很抱歉..这将在xml文件中创建一个错误,你的R.java文件将会丢失..不是解决方案。 –