<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>React Native Vision Camera CompailedDebugKotlin &#8211; Necip Sünbül</title>
	<atom:link href="https://blog.necipsunbul.com/tag/react-native-vision-camera-compaileddebugkotlin/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.necipsunbul.com</link>
	<description>Kişisel Blog Sitesi</description>
	<lastBuildDate>Sun, 16 Jun 2024 17:11:38 +0000</lastBuildDate>
	<language>tr</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.2</generator>
	<item>
		<title>React Native Vision Camera CompailedDebugKotlin Hatası</title>
		<link>https://blog.necipsunbul.com/2024/06/16/react-native-vision-camera-compaileddebugkotlin-hatasi/</link>
		
		<dc:creator><![CDATA[necip]]></dc:creator>
		<pubDate>Sun, 16 Jun 2024 17:03:36 +0000</pubDate>
				<category><![CDATA[Yazılım]]></category>
		<category><![CDATA[:react-native-vision-camera:compileDebugKotlin FAILED]]></category>
		<category><![CDATA[react native]]></category>
		<category><![CDATA[react native hata]]></category>
		<category><![CDATA[react native vision camera]]></category>
		<category><![CDATA[React Native Vision Camera CompailedDebugKotlin]]></category>
		<guid isPermaLink="false">https://blog.necipsunbul.com/?p=1882</guid>

					<description><![CDATA[React Native Vision Camera, mobil uygulamalarda yüksek performanslı ve esnek kamera çözümleri sunan güçlü bir kütüphanedir. Özellikle React Native projeleri için optimize edilmiştir. Vision Camera, modern kamera API&#8217;leri kullanarak hızlı görüntü yakalama, video kaydı, QR kod tarama ve daha birçok ileri seviye kamera işlevini destekler. Bu kütüphaneyi kullanırken react native 0.74.1 sürümünde android şu hatayı aldım. Task :react-native-vision-camera:compileDebugKotlin FAILED Bu tarih itibari ile sorun sizdede düzelmemişse bulduğum çözümü sizinle paylaşayım. Öncelikle node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/frameprocessors/VisionCameraProxy.kt dosyasını açıyoruz ve dosyanın üst kısmına şu satırı ekliyoruz. import com.facebook.react.common.annotations.FrameworkAPI Aynı dosyada @Suppress(&#8220;KotlinJniMissingFunction&#8221;) satırını bulup hemen üst... <span class="more"><a class="more-link" href="https://blog.necipsunbul.com/2024/06/16/react-native-vision-camera-compaileddebugkotlin-hatasi/">Devamını Oku</a></span>]]></description>
										<content:encoded><![CDATA[
<p>React Native Vision Camera, mobil uygulamalarda yüksek performanslı ve esnek kamera çözümleri sunan güçlü bir kütüphanedir. Özellikle React Native projeleri için optimize edilmiştir. Vision Camera, modern kamera API&#8217;leri kullanarak hızlı görüntü yakalama, video kaydı, QR kod tarama ve daha birçok ileri seviye kamera işlevini destekler.</p>



<p>Bu kütüphaneyi kullanırken react native 0.74.1 sürümünde android şu hatayı aldım.</p>



<p><code><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-vivid-purple-color">Task :react-native-vision-camera:compileDebugKotlin FAILED</mark></code></p>



<p>Bu tarih itibari ile sorun sizdede düzelmemişse bulduğum çözümü sizinle paylaşayım. Öncelikle <mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-vivid-purple-color"><em>node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/frameprocessors/VisionCameraProxy.kt</em></mark> dosyasını açıyoruz ve dosyanın üst kısmına şu satırı ekliyoruz.</p>



<pre class="wp-block-preformatted"><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-vivid-purple-color">import com.facebook.react.common.annotations.FrameworkAPI</mark></pre>



<p>Aynı dosyada <strong>@Suppress(&#8220;KotlinJniMissingFunction&#8221;)</strong> satırını bulup hemen üst kısmına şu satırı ekliyoruz.</p>



<pre class="wp-block-preformatted"><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-vivid-purple-color">@OptIn(FrameworkAPI::class)</mark></pre>



<p>Dosyanın son hali şu şekilde olmalıdır.</p>



<p>Keyifli kodlamalar <img src="https://s.w.org/images/core/emoji/15.0.3/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>



<pre class="wp-block-code"><code>package com.mrousavy.camera.frameprocessors

import android.util.Log
import androidx.annotation.Keep
import androidx.annotation.UiThread
import com.facebook.jni.HybridData
import com.facebook.proguard.annotations.DoNotStrip
import com.facebook.react.bridge.ReactApplicationContext
import com.facebook.react.bridge.UiThreadUtil
<em><mark style="background-color:rgba(0, 0, 0, 0);color:#14885d" class="has-inline-color">import com.facebook.react.common.annotations.FrameworkAPI</mark></em>
import com.facebook.react.turbomodule.core.CallInvokerHolderImpl
import com.facebook.react.uimanager.UIManagerHelper
import com.mrousavy.camera.core.ViewNotFoundError
import com.mrousavy.camera.react.CameraView
import java.lang.ref.WeakReference
<em>
<mark style="background-color:rgba(0, 0, 0, 0);color:#14885d" class="has-inline-color">@OptIn(FrameworkAPI::class)</mark></em>
@Suppress("KotlinJniMissingFunction") // we use fbjni.
class VisionCameraProxy(private val reactContext: ReactApplicationContext) {
  companion object {
    const val TAG = "VisionCameraProxy"
  }

  @DoNotStrip
  @Keep
  private var mHybridData: HybridData
  private var mContext: WeakReference&lt;ReactApplicationContext>
  private var mScheduler: VisionCameraScheduler
  val context: ReactApplicationContext
    get() = reactContext

  init {
    val jsCallInvokerHolder = context.catalystInstance.jsCallInvokerHolder as CallInvokerHolderImpl
    val jsRuntimeHolder =
      context.javaScriptContextHolder?.get() ?: throw Error("JSI Runtime is null! VisionCamera does not yet support bridgeless mode..")
    mScheduler = VisionCameraScheduler()
    mContext = WeakReference(context)
    mHybridData = initHybrid(jsRuntimeHolder, jsCallInvokerHolder, mScheduler)
  }

  @UiThread
  private fun findCameraViewById(viewId: Int): CameraView {
    Log.d(TAG, "Finding view $viewId...")
    val ctx = mContext.get()
    val view = if (ctx != null) UIManagerHelper.getUIManager(ctx, viewId)?.resolveView(viewId) as CameraView? else null
    Log.d(TAG, if (view != null) "Found view $viewId!" else "Couldn't find view $viewId!")
    return view ?: throw ViewNotFoundError(viewId)
  }

  @Suppress("unused")
  @DoNotStrip
  @Keep
  fun setFrameProcessor(viewId: Int, frameProcessor: FrameProcessor) {
    UiThreadUtil.runOnUiThread {
      val view = findCameraViewById(viewId)
      view.frameProcessor = frameProcessor
    }
  }

  @Suppress("unused")
  @DoNotStrip
  @Keep
  fun removeFrameProcessor(viewId: Int) {
    UiThreadUtil.runOnUiThread {
      val view = findCameraViewById(viewId)
      view.frameProcessor = null
    }
  }

  @Suppress("unused")
  @DoNotStrip
  @Keep
  fun initFrameProcessorPlugin(name: String, options: Map&lt;String, Any>): FrameProcessorPlugin? =
    FrameProcessorPluginRegistry.getPlugin(name, this, options)

  // private C++ funcs
  private external fun initHybrid(jsContext: Long, jsCallInvokerHolder: CallInvokerHolderImpl, scheduler: VisionCameraScheduler): HybridData
}</code></pre>



<p class="has-small-font-size"><em>Kapak görseli dalle tarafından oluşturulmuştur.</em></p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
