清单文件中有一些权限限制....我删除它但应用程序仍然在按钮点击时崩溃....其余的按钮工作得很好.....当我使用记事本时它开始发生SDK中的示例代码用于为我的应用程序提供类似的“保存注释”
这些是新的logcat详细信息
09-13 03:23:42.743: E/AudioTrack(776): Could not get audio output for stream type 3
09-13 03:23:42.743: E/SoundPool(776): Error creating AudioTrack
09-13 03:23:43.363: D/dalvikvm(776): GC_FOR_ALLOC freed 104K, 3% free 10299K/10524K, paused 61ms, total 95ms
09-13 03:23:43.394: I/dalvikvm-heap(776): Grow heap (frag case) to 13.121MB for 3094560-byte allocation
09-13 03:23:43.563: D/dalvikvm(776): GC_FOR_ALLOC freed 3542K, 28% free 9779K/13548K, paused 172ms, total 173ms
09-13 03:23:44.223: I/Choreographer(776): Skipped 329 frames! The application may be doing too much work on its main thread.
09-13 03:23:44.493: I/Choreographer(776): Skipped 64 frames! The application may be doing too much work on its main thread.
09-13 03:23:44.913: I/Choreographer(776): Skipped 97 frames! The application may be doing too much work on its main thread.
09-13 03:23:45.693: I/Choreographer(776): Skipped 77 frames! The application may be doing too much work on its main thread.
09-13 03:23:51.364: E/AudioTrack(776): Could not get audio output for stream type 3
09-13 03:23:51.364: E/SoundPool(776): Error creating AudioTrack
09-13 03:23:51.914: D/AndroidRuntime(776): Shutting down VM
09-13 03:23:51.914: W/dalvikvm(776): threadid=1: thread exiting with uncaught exception (group=0x41465700)
09-13 03:23:52.024: E/AndroidRuntime(776): FATAL EXCEPTION: main
09-13 03:23:52.024: E/AndroidRuntime(776): java.lang.RuntimeException: Unable to start activity ComponentInfo{hellog.diwesh.NugaBest/helog.diwesh.NugaBest.NotesList}: java.lang.SecurityException: Permission Denial: opening provider com.example.android.notepad.NotePadProvider from ProcessRecord{41986ad8 776:hellog.diwesh.NugaBest/u0a10049} (pid=776, uid=10049) that is not exported from uid 10050
09-13 03:23:52.024: E/AndroidRuntime(776): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2211)
09-13 03:23:52.024: E/AndroidRuntime(776): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
09-13 03:23:52.024: E/AndroidRuntime(776): at android.app.ActivityThread.access$600(ActivityThread.java:141)
09-13 03:23:52.024: E/AndroidRuntime(776): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
09-13 03:23:52.024: E/AndroidRuntime(776): at android.os.Handler.dispatchMessage(Handler.java:99)
09-13 03:23:52.024: E/AndroidRuntime(776): at android.os.Looper.loop(Looper.java:137)
09-13 03:23:52.024: E/AndroidRuntime(776): at android.app.ActivityThread.main(ActivityThread.java:5103)
09-13 03:23:52.024: E/AndroidRuntime(776): at java.lang.reflect.Method.invokeNative(Native Method)
09-13 03:23:52.024: E/AndroidRuntime(776): at java.lang.reflect.Method.invoke(Method.java:525)
09-13 03:23:52.024: E/AndroidRuntime(776): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
09-13 03:23:52.024: E/AndroidRuntime(776): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
09-13 03:23:52.024: E/AndroidRuntime(776): at dalvik.system.NativeStart.main(Native Method)
09-13 03:23:52.024: E/AndroidRuntime(776): Caused by: java.lang.SecurityException: Permission Denial: opening provider com.example.android.notepad.NotePadProvider from ProcessRecord{41986ad8 776:hellog.diwesh.NugaBest/u0a10049} (pid=776, uid=10049) that is not exported from uid 10050
09-13 03:23:52.024: E/AndroidRuntime(776): at android.os.Parcel.readException(Parcel.java:1431)
09-13 03:23:52.024: E/AndroidRuntime(776): at android.os.Parcel.readException(Parcel.java:1385)
09-13 03:23:52.024: E/AndroidRuntime(776): at android.app.ActivityManagerProxy.getContentProvider(ActivityManagerNative.java:2611)
09-13 03:23:52.024: E/AndroidRuntime(776): at android.app.ActivityThread.acquireProvider(ActivityThread.java:4515)
09-13 03:23:52.024: E/AndroidRuntime(776): at android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2036)
09-13 03:23:52.024: E/AndroidRuntime(776): at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1149)
09-13 03:23:52.024: E/AndroidRuntime(776): at android.content.ContentResolver.query(ContentResolver.java:398)
09-13 03:23:52.024: E/AndroidRuntime(776): at android.content.ContentResolver.query(ContentResolver.java:357)
09-13 03:23:52.024: E/AndroidRuntime(776): at android.app.Activity.managedQuery(Activity.java:1765)
09-13 03:23:52.024: E/AndroidRuntime(776): at helog.diwesh.NugaBest.NotesList.onCreate(NotesList.java:104)
09-13 03:23:52.024: E/AndroidRuntime(776): at android.app.Activity.performCreate(Activity.java:5133)
09-13 03:23:52.024: E/AndroidRuntime(776): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
09-13 03:23:52.024: E/AndroidRuntime(776): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2175)
09-13 03:23:52.024: E/AndroidRuntime(776): ... 11 more
09-13 03:23:56.654: I/Process(776): Sending signal. PID: 776 SIG: 9
Androidmanifst
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="hellog.diwesh.NugaBest"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="11" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:name="helog.diwesh.NugaBest.MyApplication"
android:debuggable="true"
android:icon="@drawable/nuga"
android:label="@string/app_name" >
<activity
android:name="helog.diwesh.NugaBest.NUGA_HealthCareActivity_Intro"
android:configChanges="orientation|keyboardHidden"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
// 4. Layout Management
<activity
android:name="helog.diwesh.NugaBest.FileSiganlDisplay"
android:label="FileSiganlDisplay" />
<activity
android:name="helog.diwesh.NugaBest.NUGA_WebJoinActivity"
android:label="NUGA_WebJoinActivity"
android:windowSoftInputMode="stateHidden" />
<activity
android:name="helog.diwesh.NugaBest.NUGA_MainMenuActivity"
android:label="NUGA_MainMenuActivity" />
<activity
android:name="helog.diwesh.NugaBest.BTSmartSlavemodule"
android:configChanges="orientation|keyboardHidden"
android:label="SmartSlavemodule" />
<activity
android:name="helog.diwesh.NugaBest.BTDeviceListActivity"
android:configChanges="orientation|keyboardHidden"
android:label="@string/select_device"
android:theme="@android:style/Theme.Dialog" />
<activity
android:name="helog.diwesh.NugaBest.SnapActivity"
android:label="@string/title_activity_snap" >
</activity>
<activity
android:name="helog.diwesh.NugaBest.ImagesActivity"
android:label="@string/title_activity_images" >
</activity>
<activity
android:name="helog.diwesh.NugaBest.HelpActivity"
android:label="@string/Help" >
</activity>
<activity
android:name="helog.diwesh.NugaBest.AboutDevice"
android:label="@string/aboutus" >
</activity>
// Notepad Application
<activity android:name="NotesList" android:label="@string/title_notes_list">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.EDIT" />
<action android:name="android.intent.action.PICK" />
<data android:mimeType="vnd.android.cursor.dir/vnd.google.note" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.GET_CONTENT" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="vnd.android.cursor.item/vnd.google.note" />
</intent-filter>
</activity>
<activity android:name="NoteEditor"
android:theme="@android:style/Theme.Holo.Light"
android:screenOrientation="sensor"
android:configChanges="keyboardHidden|orientation"
>
<!-- This filter says that we can view or edit the data of
a single note -->
<intent-filter android:label="@string/resolve_edit">
<action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.EDIT" />
<action android:name="helog.diwesh.NugaBest.action.EDIT_NOTE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="vnd.android.cursor.item/vnd.google.note" />
</intent-filter>
<!-- This filter says that we can create a new note inside
of a directory of notes. The INSERT action creates an
empty note; the PASTE action initializes a new note from
the current contents of the clipboard. -->
<intent-filter>
<action android:name="android.intent.action.INSERT" />
<action android:name="android.intent.action.PASTE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="vnd.android.cursor.dir/vnd.google.note" />
</intent-filter>
</activity>
<activity android:name="TitleEditor"
android:label="@string/title_edit_title"
android:icon="@drawable/ic_menu_edit"
android:theme="@android:style/Theme.Holo.Dialog"
android:windowSoftInputMode="stateVisible">
<!-- This activity implements an alternative action that can be
performed on notes: editing their title. It can be used as
a default operation if the user invokes this action, and is
available as an alternative action for any note data. -->
<intent-filter android:label="@string/resolve_title">
<!-- This is the action we perform. It is a custom action we
define for our application, not a generic VIEW or EDIT
action since we are not a general note viewer/editor. -->
<action android:name="helog.diwesh.NugaBest.action.EDIT_TITLE" />
<!-- DEFAULT: execute if being directly invoked. -->
<category android:name="android.intent.category.DEFAULT" />
<!-- ALTERNATIVE: show as an alternative action when the user is
working with this type of data. -->
<category android:name="android.intent.category.ALTERNATIVE" />
<!-- SELECTED_ALTERNATIVE: show as an alternative action the user
can perform when selecting this type of data. -->
<category android:name="android.intent.category.SELECTED_ALTERNATIVE" />
<!-- This is the data type we operate on. -->
<data android:mimeType="vnd.android.cursor.item/vnd.google.note" />
</intent-filter>
</activity>
<activity android:name="NotesLiveFolder" android:label="@string/live_folder_name"
android:icon="@drawable/live_folder_notes">
<intent-filter>
<action android:name="android.intent.action.CREATE_LIVE_FOLDER" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
答案 0 :(得分:1)
您尚未在清单文件中声明NoteList活动。
请在清单中加入。
希望它能帮助!!
答案 1 :(得分:0)
Unable to find explicit activity class {hellog.diwesh.NugaBest/helog.diwesh.NugaBest.NotesList}; have you declared this activity in your AndroidManifest.xml?
这意味着您忘记在清单文件中声明NotesList activity
,如果您声明,那么您的packagename
声明会出现问题,请在清单文件中交叉检查activity & package name
并确认您已正确声明。
答案 2 :(得分:0)
这里错误,你还没有正确宣布
<activity android:name="NotesList" android:label="@string/title_notes_list">
像这样做
<activity android:name=".NotesList" android:label="@string/title_notes_list">
您的软件包名称错误,您的软件包名称为hellog.diwesh.NugaBest
,但您在helog.diwesh.NugaBest
之类的所有活动中声明的内容都会根据该名称进行更改。