Skip to content

com.tns.app_protection does not exist #9

Open

Description

@priyangamani

D:\Sample\platforms\android\src\main\java\com\tns\RuntimeHe
lper.java:57: error: package com.tns.app_protection does not exist
com.tns.app_protection.AppProtection.setKey("qyUMQZhu43KByppjVJFJyRxVG+PZaRAHId2
+mczHiwo=");
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error
:compileF0F1F2F3F4F5F6F7F8F9F10F11F12F13F14F15F16ReleaseJavaWithJavac FAILED

FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':compileF0F1F2F3F4F5F6F7F8F9F10F11F12F13F14F15F16Rele
aseJavaWithJavac'.

Compilation failed; see the compiler error output for details.

Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.

Activity

  1. ju4nj3 commented on Jul 12, 2017

    @ju4nj3

    Use 0.3.0. It works. I tested it right now because I'm unable to get Webpack working. It breaks my code and I did everything possible I found. My vote to keep this project open.

  2. zenz commented on Aug 14, 2017

    @zenz

    second that vote, this is better than webpack and uglify

  3. zenz commented on Aug 15, 2017

    @zenz

    So this is the temp solution for this plugin, and this plugin has been deprecated but it's very useful and better than uglifyjs in webpack in personal opinion. It works for me.

    after tns plugin install nativescript-app-encryption, navigate to node_modules/nativescript-app-encryption/hooks path.
    modify the file after-prepare.js comment out this part

    // The hook is used only on iOS 
    //if (hookArgs.platform != 'ios') { 
        //return; 
    //}
    

    do the tns prepare android
    create a folder named app_protection under platform/android/src/main/java/com/tns.
    create and edit a file named AppProtection.java
    copy and paste the code from https://github.com/NativeScript/nativescript-app-encryption/blob/master/native-src/android/app/src/main/java/com/tns/app_protection/AppProtection.java
    save and compile your code. That's it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions