2013-08-11 29 views
5

ứng dụng Superuser được cài đặt trên điện thoại của tôi, nhưng ứng dụng của tôi rơi khi đang cố gắng để thực hiện một yêu cầu superuser với các lỗi sau:hoạt động Superuser không tìm thấy

18820-18820/com.anth.res E/AndroidRuntime: FATAL EXCEPTION: main 
    android.content.ActivityNotFoundException: No Activity found to handle Intent { act=act=android.intent.action.superuser (has extras) } 
    at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1512) 
    ... 

đây của yêu cầu làm CIDE từ hoạt động của tôi:

command = "su -c \""+command+"\""; 
Intent intent = new Intent("android.intent.action.superuser"); // superuser request 
intent.putExtra("name", getResources().getString(R.string.app_name)); // tell Superuser the name of the requesting app 
intent.putExtra("packagename", "com.anth.res"); // tel Superuser the name of the requesting package 
startActivityForResult(intent, SU_REQUEST); // make the request! 
+1

bạn có thể cần phải thấy điều này: http://stackoverflow.com/questions/3988454/request-superuser-rights-to-edit-file –

Trả lời

1

Vui lòng kiểm tra file.Have manifest của bạn, bạn tuyên bố hoạt động của bạn đúng cách như thế này:

<activity android:name=".MainActivity"> 
      <intent-filter> 
       <action android:name="android.intent.action.MAIN" /> 

       <category android:name="android.intent.category.LAUNCHER" /> 
      </intent-filter> 
     </activity> 
Các vấn đề liên quan