java.lang.NoSuchMethodError: android.app.Activity.checkSelfPermission

Appcelerator JIRA | Ashraf Abu | 1 year ago
  1. 0

    Running code: {code} Titanium.Media.showCamera({ success:function(event) { // called when media returned from the camera Ti.API.debug('Our type was: '+event.mediaType); if(event.mediaType == Ti.Media.MEDIA_TYPE_PHOTO) { var imageView = Ti.UI.createImageView({ width:win.width, height:win.height, image:event.media }); win.add(imageView); } else { alert("got the wrong type back ="+event.mediaType); } }, cancel:function() { // called when user cancels taking a picture }, error:function(error) { // called when there's an error var a = Titanium.UI.createAlertDialog({title:'Camera'}); a.setMessage(JSON.stringify(error)); a.show(); }, saveToPhotoGallery:true }); {code} Gives rise to log error: {code} 10-01 13:07:22.718: E/TiExceptionHandler(27510): (main) [51,51] ----- Titanium Javascript Runtime Error ----- 10-01 13:07:22.718: E/TiExceptionHandler(27510): (main) [0,51] - In app.js:1,16 10-01 13:07:22.718: E/TiExceptionHandler(27510): (main) [1,52] - Message: Uncaught Error: android.app.Activity.checkSelfPermission 10-01 13:07:22.718: E/TiExceptionHandler(27510): (main) [0,52] - Source: Titanium.Media.showCamera({ {code} Due to https://github.com/appcelerator/titanium_mobile/blob/32600b01047b4654c92b341c6f0b61d38fa702b1/android/modules/media/src/java/ti/modules/titanium/media/MediaModule.java#L288 http://developer.android.com/reference/android/content/Context.html#checkSelfPermission(java.lang.String) Being only available in API Level 23 and above. More logs: {code} 10-01 13:07:22.628: W/System.err(27510): java.lang.NoSuchMethodError: android.app.Activity.checkSelfPermission 10-01 13:07:22.628: W/System.err(27510): at ti.modules.titanium.media.MediaModule.hasPermissions(MediaModule.java:288) 10-01 13:07:22.628: W/System.err(27510): at ti.modules.titanium.media.MediaModule.showCamera(MediaModule.java:300) 10-01 13:07:22.628: W/System.err(27510): at org.appcelerator.kroll.runtime.v8.V8Runtime.nativeRunModule(Native Method) 10-01 13:07:22.628: W/System.err(27510): at org.appcelerator.kroll.runtime.v8.V8Runtime.doRunModule(V8Runtime.java:177) 10-01 13:07:22.628: W/System.err(27510): at org.appcelerator.kroll.KrollRuntime.handleMessage(KrollRuntime.java:299) 10-01 13:07:22.628: W/System.err(27510): at org.appcelerator.kroll.runtime.v8.V8Runtime.handleMessage(V8Runtime.java:203) 10-01 13:07:22.628: W/System.err(27510): at android.os.Handler.dispatchMessage(Handler.java:98) 10-01 13:07:22.628: W/System.err(27510): at android.os.Looper.loop(Looper.java:136) 10-01 13:07:22.628: W/System.err(27510): at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:112) {code}

    Appcelerator JIRA | 1 year ago | Ashraf Abu
    java.lang.NoSuchMethodError: android.app.Activity.checkSelfPermission
  2. 0

    Running code: {code} Titanium.Media.showCamera({ success:function(event) { // called when media returned from the camera Ti.API.debug('Our type was: '+event.mediaType); if(event.mediaType == Ti.Media.MEDIA_TYPE_PHOTO) { var imageView = Ti.UI.createImageView({ width:win.width, height:win.height, image:event.media }); win.add(imageView); } else { alert("got the wrong type back ="+event.mediaType); } }, cancel:function() { // called when user cancels taking a picture }, error:function(error) { // called when there's an error var a = Titanium.UI.createAlertDialog({title:'Camera'}); a.setMessage(JSON.stringify(error)); a.show(); }, saveToPhotoGallery:true }); {code} Gives rise to log error: {code} 10-01 13:07:22.718: E/TiExceptionHandler(27510): (main) [51,51] ----- Titanium Javascript Runtime Error ----- 10-01 13:07:22.718: E/TiExceptionHandler(27510): (main) [0,51] - In app.js:1,16 10-01 13:07:22.718: E/TiExceptionHandler(27510): (main) [1,52] - Message: Uncaught Error: android.app.Activity.checkSelfPermission 10-01 13:07:22.718: E/TiExceptionHandler(27510): (main) [0,52] - Source: Titanium.Media.showCamera({ {code} Due to https://github.com/appcelerator/titanium_mobile/blob/32600b01047b4654c92b341c6f0b61d38fa702b1/android/modules/media/src/java/ti/modules/titanium/media/MediaModule.java#L288 http://developer.android.com/reference/android/content/Context.html#checkSelfPermission(java.lang.String) Being only available in API Level 23 and above. More logs: {code} 10-01 13:07:22.628: W/System.err(27510): java.lang.NoSuchMethodError: android.app.Activity.checkSelfPermission 10-01 13:07:22.628: W/System.err(27510): at ti.modules.titanium.media.MediaModule.hasPermissions(MediaModule.java:288) 10-01 13:07:22.628: W/System.err(27510): at ti.modules.titanium.media.MediaModule.showCamera(MediaModule.java:300) 10-01 13:07:22.628: W/System.err(27510): at org.appcelerator.kroll.runtime.v8.V8Runtime.nativeRunModule(Native Method) 10-01 13:07:22.628: W/System.err(27510): at org.appcelerator.kroll.runtime.v8.V8Runtime.doRunModule(V8Runtime.java:177) 10-01 13:07:22.628: W/System.err(27510): at org.appcelerator.kroll.KrollRuntime.handleMessage(KrollRuntime.java:299) 10-01 13:07:22.628: W/System.err(27510): at org.appcelerator.kroll.runtime.v8.V8Runtime.handleMessage(V8Runtime.java:203) 10-01 13:07:22.628: W/System.err(27510): at android.os.Handler.dispatchMessage(Handler.java:98) 10-01 13:07:22.628: W/System.err(27510): at android.os.Looper.loop(Looper.java:136) 10-01 13:07:22.628: W/System.err(27510): at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:112) {code}

    Appcelerator JIRA | 1 year ago | Ashraf Abu
    java.lang.NoSuchMethodError: android.app.Activity.checkSelfPermission
  3. 0

    WS + Tivoli Directory Server: Web Admin Tool throws NoSuchMethodError

    Google Groups | 1 decade ago | mark.m...@adapta.it
    java.lang.NoSuchMethodError: com.ibm.psw.wcl.components.table.WTable: method getResourceBundle(Ljava/util/Locale; )Ljava/util/ResourceBundle; not found
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Error while creating stubs and skeletons

    Google Groups | 10 years ago | siva_t...@adp.com
    java.lang.NoSuchMethodError: com.ibm.ejs.container.EJSContainer: method doesJaccNeedsEJBArguments(Lcom/ibm/ejs/container/EJSWrapperBase;)Z not found
  6. 0

    Crash in TileAlloySmelter server-side.

    GitHub | 3 years ago | tetious
    java.lang.NoSuchMethodError: mrtjp.projectred.tiles.TileAlloySmelter.spawnParticles()V

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NoSuchMethodError

      android.app.Activity.checkSelfPermission

      at ti.modules.titanium.media.MediaModule.hasPermissions()
    2. ti.modules.titanium
      MediaModule.showCamera
      1. ti.modules.titanium.media.MediaModule.hasPermissions(MediaModule.java:288)
      2. ti.modules.titanium.media.MediaModule.showCamera(MediaModule.java:300)
      2 frames
    3. org.appcelerator.kroll
      V8Runtime.handleMessage
      1. org.appcelerator.kroll.runtime.v8.V8Runtime.nativeRunModule(Native Method)
      2. org.appcelerator.kroll.runtime.v8.V8Runtime.doRunModule(V8Runtime.java:177)
      3. org.appcelerator.kroll.KrollRuntime.handleMessage(KrollRuntime.java:299)
      4. org.appcelerator.kroll.runtime.v8.V8Runtime.handleMessage(V8Runtime.java:203)
      4 frames
    4. Android Platform
      Looper.loop
      1. android.os.Handler.dispatchMessage(Handler.java:98)
      2. android.os.Looper.loop(Looper.java:136)
      2 frames
    5. org.appcelerator.kroll
      KrollRuntime$KrollRuntimeThread.run
      1. org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:112)
      1 frame