tkyaji / cordova-plugin-crypt-file

This plugin to encrypt the source files.
Apache License 2.0
178 stars 116 forks source link

BREAKING CHANGE AFTER CORDOVA ANDROID 7+ #59

Closed leftdead7 closed 6 years ago

leftdead7 commented 6 years ago

In the latest version of cordova android(7.0) the directory structures have changed , so i guess the hook is unable to execute the java file at the specified path

getting the following error in cordova android 7.0 Error: ENOENT: no such file or directory, open 'C:\Users\divyas\cordovaapps\latestPlatformTest\platforms\android\src\com\tkyaji\cordova\DecryptResource.java'

The same is working with cordova android 6.3.0

SEUNAKINTOLA commented 6 years ago

open plugins/cordova-plugin-crypt-file/hooks/after_prepare.js and change line 58 from var pluginDir = path.join(platformPath, 'src'); to var pluginDir = path.join(platformPath, 'app/src/main/java');

cyclonmaster-zz commented 6 years ago

I use Cordova Android 7.0.0 with Cordova command 8.0.0.

I get this error when try to build Android after install this plugin.

cordova UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: EISDIR: illegal operation on a directory

leftdead7 commented 6 years ago

@SEUNAKINTOLA Thanx it worked for me

hamedinia commented 6 years ago

Thnx, worked for me too.

Ahiaz commented 6 years ago

Answare

yascasa commented 5 years ago

open plugins/cordova-plugin-crypt-file/hooks/after_prepare.js and change line 58 from var pluginDir = path.join(platformPath, 'src'); to var pluginDir = path.join(platformPath, 'app/src/main/java');

this fix the problem of build but when i try to run application show this message net::ERR_FILE_NOT_FOUND (file:///android_asset/www/+++/index.html)

this is my info

Ionic:

ionic (Ionic CLI) : 4.1.1 (C:\Users\yassine\AppData\Roaming\npm\node_modules\ionic) Ionic Framework : ionic-angular 3.9.2 @ionic/app-scripts : 3.2.0

Cordova:

cordova (Cordova CLI) : 8.0.0 Cordova Platforms : not available Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.2.3, (and 15 other plugins)

System:

Android SDK Tools : 26.1.1 (C:\Users\yassine\AppData\Local\Android\Sdk) NodeJS : v8.2.1 (C:\Program Files\nodejs\node.exe) npm : 5.3.0 OS : Windows 10

biji commented 5 years ago

cordova plugin add cordova-plugin-crypt-file dont give latest release