Security Exception after using encryption decryption library "robovm-rt-1.13.0"

95 views Asked by At

I am using "robovm-rt-1.13.0" (an encryption-decryption library) in my android project. After encrypting when I try to build the project, I get the following error:

Error:Execution failed for task ':app:transformClassesWithInstantRunForDebug'.

java.lang.SecurityException: Prohibited package name: java.lang

And below is my build.gradle file:

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 25
buildToolsVersion '25.0.3'

defaultConfig {
    applicationId "com.athansys.patient.athansys"
    minSdkVersion 19
    targetSdkVersion 25
    versionCode 1
    versionName "1.0"
    multiDexEnabled true

}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }

}
aaptOptions {
    cruncherEnabled = false
}

}
repositories {
maven { url "https://jitpack.io" }
}

ext {
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.android.volley:volley:1.0.0'
compile 'com.github.PhilJay:MPAndroidChart:v2.2.2'
compile 'com.google.code.gson:gson:2.7'
compile project(':robovm-rt-1.13.0')
}

Could someone help me sort this issue. Thanks in advance!

1

There are 1 answers

0
Zafar Kurbonov On

You cannot use java or javax as the name of your package. Replace it to something else.

java.lang.SecurityException: Prohibited package name: java

Edit: Move your Main.java file in a (source) directory that doesn't start with java or javax and use the directory structure names to change your package name in the code.

No problems with Dependencies .