NativeScript / NativeScript/plugins

[@nativescript/camera] _nativescript_core__WEBPACK_IMPORTED_MODULE_0__.Utils.isNullOrUndefined is not a function

未關閉
#54 3 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

backport-requested
主要語言
TypeScript
星號
206
分支
123
平均合併
2 天 1 小時
30 天內合併 PR
1

描述

Hi,

I had this issue by using

"nativescript-camera": "^4.4.0"

So i saw it was fixed on version 5.0.2 of @nativescript/camera , i removed the last one and puted this. But now i have another error message :

TypeError: nativescript_core__WEBPACK_IMPORTED_MODULE_0_.Utils.isNullOrUndefined is not a function

I'm on nativescript (v6.5.1) angular, android 11, this is my package.json if needed:

{
  "nativescript": {
    "id": "myID",
    "tns-android": {
      "version": "6.5.3"
    }
  },
  "description": "NativeScript Application",
  "license": "SEE LICENSE IN <your-license-filename>",
  "repository": "<fill-your-repository-here>",
  "dependencies": {
    "@angular/animations": "~8.2.0",
    "@angular/common": "~8.2.0",
    "@angular/compiler": "~8.2.0",
    "@angular/core": "~8.2.0",
    "@angular/forms": "~8.2.0",
    "@angular/http": "8.0.0-beta.10",
    "@angular/platform-browser": "~8.2.0",
    "@angular/platform-browser-dynamic": "~8.2.0",
    "@angular/router": "~8.2.0",
    "@nativescript/camera": "^5.0.2",
    "@nativescript/theme": "^3.0.1",
    "@ngx-translate/core": "^11.0.1",
    "@ngx-translate/http-loader": "^4.0.0",
    "@nstudio/nativescript-camera-plus": "^3.1.0",
    "@nstudio/nativescript-loading-indicator": "^1.0.0",
    "nativescript-angular": "^8.20.4",
    "nativescript-background-http": "^3.4.0",
    "nativescript-datetimepicker": "^1.2.3",
    "nativescript-imagecropper": "^3.0.0",
    "nativescript-imagepicker": "^7.1.0",
    "nativescript-nfc": "4.0.1",
    "nativescript-permissions": "^1.3.8",
    "nativescript-plugin-firebase": "9.0.2",
    "nativescript-theme-core": "~1.0.4",
    "nativescript-ui-chart": "^7.1.1",
    "nativescript-ui-sidedrawer": "^8.0.1",
    "reflect-metadata": "~0.1.10",
    "rxjs": "^6.4.0",
    "tns-core-modules": "^6.3.2",
    "zone.js": "^0.9.1"
  },
  "devDependencies": {
    "@angular/compiler-cli": "~8.2.0",
    "@nativescript/schematics": "~0.5.0",
    "@ngtools/webpack": "~8.2.0",
    "@types/jasmine": "^3.5.11",
    "nativescript-dev-webpack": "^1.4.1",
    "tns-platform-declarations": "6.0.1",
    "typescript": "~3.5.3"
  },
  "readme": "NativeScript Application"
}

Manifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
	package="__PACKAGE__"
	android:versionCode="20031"
	android:versionName="2.31">

	<supports-screens
		android:smallScreens="true"
		android:normalScreens="true"
		android:largeScreens="true"
		android:xlargeScreens="true"/>

	<uses-sdk
		android:minSdkVersion="26"
		android:targetSdkVersion="__APILEVEL__"/>
		
	<uses-permission android:name="android.permission.CAMERA"/>
	<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
	<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
	<uses-permission android:name="android.permission.INTERNET"/>
	
	
	<uses-feature android:name="android.hardware.camera" android:required="false" />
	<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
	<meta-data
	android:name="com.google.firebase.ml.vision.DEPENDENCIES"
	android:value="barcode"/>

	<application
		android:name="com.tns.NativeScriptApplication"
		android:allowBackup="true"
		android:icon="@drawable/icon"
		android:label="@string/app_name"
		android:requestLegacyExternalStorage="true"
		android:largeHeap="true"
		android:theme="@style/AppTheme">


		<activity
			android:name="com.tns.NativeScriptActivity" 
			android:label="@string/title_activity_kimera"
			android:configChanges="keyboardHidden|orientation|screenSize|uiMode" 
 		    android:theme="@style/LaunchScreenTheme"
			android:screenOrientation="portrait">

 			<meta-data android:name="SET_THEME_ON_LAUNCH" android:resource="@style/AppTheme" /> 

			<intent-filter> 
 			<action android:name="android.intent.action.MAIN" /> 
 			<category android:name="android.intent.category.LAUNCHER" /> 
 			</intent-filter> 
		</activity>
		<activity android:name="com.tns.ErrorReportActivity"/>
	</application>
</manifest>

Please help ! Thanks !

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

未指定來源檔案或測試。先使用 @nativescript/camera 5.0.2、NativeScript 6.5.1、Angular 和 Android 11 重現錯誤,然後檢查相機外掛程式與 tns-core-modules 的相容性以及 webpack 設定。在回報的環境中相機外掛程式能夠載入且不出現 Utils.isNullOrUndefined 錯誤,即表示完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
android, angular, typescript, webpack
領域
mobile-dev
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
需要釐清
新手友好度
25/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。