juanchinovas / nativescript-google-drive

A Nativescript plugin to upload, download, delete and create file in Google Drive
Apache License 2.0
5 stars 1 forks source link

TS2503: Cannot find namespace 'java'. #1

Closed tbenoist1 closed 4 years ago

tbenoist1 commented 4 years ago

Hello,

First thanks for you plugin but I have some problems with it. I try to clone the plugin to execute the demo-vue. When I run it in playground I have this kind of error :

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.android.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.android.ts(1,95)
      TS2307: Cannot find module 'tns-core-modules/application'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.android.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.android.ts(2,36)
      TS2307: Cannot find module 'tns-core-modules/file-system'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.android.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.android.ts(47,46)
      TS2304: Cannot find name 'android'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.android.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.android.ts(193,37)
      TS2304: Cannot find name 'java'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.android.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.android.ts(193,65)
      TS2304: Cannot find name 'java'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.android.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.android.ts(194,37)
      TS2304: Cannot find name 'java'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.android.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.android.ts(251,42)
      TS2304: Cannot find name 'java'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.android.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.android.ts(605,85)
      TS2304: Cannot find name 'android'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.android.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.android.ts(621,52)
      TS2503: Cannot find namespace 'java'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.android.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.android.ts(622,15)
      TS2503: Cannot find namespace 'java'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.android.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.android.ts(624,16)
      TS2304: Cannot find name 'java'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.android.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.android.ts(626,16)
      TS2304: Cannot find name 'java'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.common.ts
C:/Users/Tbenoist/Documents/Projets/nativescript-google-drive/src/google-drive.common.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.common.ts(1,22)
      TS2307: Cannot find module 'tns-core-modules/file-system'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts(1,21)
      TS2307: Cannot find module 'tns-core-modules/application'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts(2,36)
      TS2307: Cannot find module 'tns-core-modules/file-system'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts(36,42)
      TS2304: Cannot find name 'NSArray'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts(65,36)
      TS2304: Cannot find name 'NSArray'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts(73,34)
      TS2304: Cannot find name 'NSString'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts(73,45)
      TS2304: Cannot find name 'NSString'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts(75,81)
      TS2304: Cannot find name 'NSUTF8StringEncoding'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts(122,31)
      TS2304: Cannot find name 'NSArray'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts(125,40)
      TS2304: Cannot find name 'NSArray'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts(135,55)
      TS2304: Cannot find name 'NSData'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts(137,34)
      TS2304: Cannot find name 'NSString'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts(137,45)
      TS2304: Cannot find name 'NSString'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts(139,81)
      TS2304: Cannot find name 'NSUTF8StringEncoding'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts(248,41)
      TS2304: Cannot find name 'NSFileManager'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts(253,34)
      TS2304: Cannot find name 'NSFileManager'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts(288,36)
      TS2304: Cannot find name 'NSArray'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts(297,37)
      TS2304: Cannot find name 'NSFileHandle'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts(448,36)
      TS2304: Cannot find name 'NSArray'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts(456,34)
      TS2304: Cannot find name 'NSString'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts(456,45)
      TS2304: Cannot find name 'NSString'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts(458,81)
      TS2304: Cannot find name 'NSUTF8StringEncoding'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts(581,37)
      TS2304: Cannot find name 'NSObject'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts(590,90)
      TS2304: Cannot find name 'NSError'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts(598,84)
      TS2304: Cannot find name 'NSError'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ios.ts(629,56)
      TS2304: Cannot find name 'NSError'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\thread-worker.ts
C:/Users/Tbenoist/Documents/Projets/nativescript-google-drive/src/thread-worker.ts (../node_modules/nativescript-worker-loader!C:/Users/Tbenoist/Documents/Projets/nativescript-google-drive/src/thread-worker.ts)
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\thread-worker.ts(54,11)
      TS2304: Cannot find name 'global'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ts
C:/Users/Tbenoist/Documents/Projets/nativescript-google-drive/src/google-drive.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ts(1,95)
      TS2307: Cannot find module 'tns-core-modules/application'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ts
C:/Users/Tbenoist/Documents/Projets/nativescript-google-drive/src/google-drive.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ts(2,36)
      TS2307: Cannot find module 'tns-core-modules/file-system'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ts
C:/Users/Tbenoist/Documents/Projets/nativescript-google-drive/src/google-drive.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ts(47,46)
      TS2304: Cannot find name 'android'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ts
C:/Users/Tbenoist/Documents/Projets/nativescript-google-drive/src/google-drive.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ts(193,37)
      TS2304: Cannot find name 'java'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ts
C:/Users/Tbenoist/Documents/Projets/nativescript-google-drive/src/google-drive.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ts(193,65)
      TS2304: Cannot find name 'java'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ts
C:/Users/Tbenoist/Documents/Projets/nativescript-google-drive/src/google-drive.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ts(194,37)
      TS2304: Cannot find name 'java'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ts
C:/Users/Tbenoist/Documents/Projets/nativescript-google-drive/src/google-drive.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ts(251,42)
      TS2304: Cannot find name 'java'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ts
C:/Users/Tbenoist/Documents/Projets/nativescript-google-drive/src/google-drive.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ts(605,85)
      TS2304: Cannot find name 'android'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ts
C:/Users/Tbenoist/Documents/Projets/nativescript-google-drive/src/google-drive.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ts(621,52)
      TS2503: Cannot find namespace 'java'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ts
C:/Users/Tbenoist/Documents/Projets/nativescript-google-drive/src/google-drive.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ts(622,15)
      TS2503: Cannot find namespace 'java'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ts
C:/Users/Tbenoist/Documents/Projets/nativescript-google-drive/src/google-drive.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ts(624,16)
      TS2304: Cannot find name 'java'.

ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ts
C:/Users/Tbenoist/Documents/Projets/nativescript-google-drive/src/google-drive.ts
[tsl] ERROR in C:\Users\Tbenoist\Documents\Projets\nativescript-google-drive\src\google-drive.ts(626,16)
      TS2304: Cannot find name 'java'.

I think it doesn't recognize this two import too :

import { android as androidContext, AndroidApplication, AndroidActivityResultEventData } from "tns-core-modules/application";
import { File, knownFolders } from "tns-core-modules/file-system";

Any Idea ? Take care,

TBenoist

juanchinovas commented 4 years ago

Hello, that's interesting error. Can you provide more information?

I'm trying to reproduce this error using tns preview command but I could not. I get a different error, but is basically because Playground does not support plugin that uses the native SDK, check that info here and this plugin does.

By the way, I'm using Android to test

tbenoist1 commented 4 years ago

Sorry I didnt receive notification for your answer. I had to stop the project for a moment because of school. For a strange reason I just integrate your vue class and it works with sidekick. I have too many errors with playground : I stopped using it.