Cause: superclass access check failed: class butterknife.compiler.ButterKnifeProcessor$RScanner (in unnamed module @0x63bdedf8) cannot access class com.sun.tools.javac.tree.TreeScanner (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.tree to unnamed module @0x63bdedf8
Try adding the following code to the app build.gradle(project level) inside android section {}
android{
tasks.withType(JavaCompile).configureEach{
options.fork = true
options.forkOptions.jvmArgs +=[
'--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED',
'--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED',
'--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED']
}
In gradle.properties file,
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
android.enableJetifier=true
android.useAndroidX=true
android.nonFinalResIds=false
Â
apply plugin: 'com.android.application'
android {
compileSdkVersion 34
// buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.power.tek"
minSdkVersion 26
targetSdkVersion 34
versionCode 1
versionName "1.0"
multiDexEnabled true
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
// Add this line
namespace "com.power.tek"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
tasks.withType(JavaCompile).configureEach{
options.fork = true
options.forkOptions.jvmArgs +=[
'--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED',
'--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED',
'--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED']
}
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
}
dependencies {
implementation 'com.google.android.material:material:1.12.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'pub.devrel:easypermissions:3.0.0'
// For developers using the Android Support Library
implementation 'pub.devrel:easypermissions:3.0.0'
implementation "com.google.android.gms:play-services-instantapps:18.1.0"
implementation 'com.github.Mika-89:Screenshot:master-SNAPSHOT'
// implementation 'com.github.MindorksOpenSource:screenshot:v0.0.1'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.23'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.1'
implementation 'com.github.bumptech.glide:glide:4.11.0'
implementation 'androidx.drawerlayout:drawerlayout:1.2.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.2.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
implementation 'com.squareup.picasso:picasso:2.71828'
// implementation "com.github.tarek360:instacapture:2.0.1"
def fragment_version = "1.3.5"
// Java language implementation
implementation "androidx.fragment:fragment:$fragment_version"
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
// Add Dependencies!!
implementation 'com.jakewharton:butterknife:10.2.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.1'
implementation 'com.github.angads25:toggle:1.1.0'
implementation 'com.kyleduo.switchbutton:library:2.1.0'
implementation 'com.github.hearsilent:DiscreteSlider:1.2.1'
implementation 'com.google.android.material:material:1.12.0'
implementation 'org.apache.httpcomponents:httpclient-android:4.3.5.1'
implementation 'org.apache.commons:commons-lang3:3.8.1'
implementation 'org.apache.commons:commons-collections4:4.4'
implementation 'commons-codec:commons-codec:1.13'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'com.jjoe64:graphview:4.2.2'
// MPAndroidChart dependency
implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'
implementation 'com.github.blackfizz:eazegraph:1.2.5l@aar'
implementation 'com.nineoldandroids:library:2.4.0'
implementation 'com.github.levitnudi:LegacyTableView:master-SNAPSHOT'
implementation 'androidx.cardview:cardview:1.0.0'
}
Â
Comments