enviroCar / enviroCar-app

enviroCar Android Application
https://envirocar.org
GNU General Public License v3.0
87 stars 153 forks source link

Error: superclass access check failed in ButterKnifeProcessor #981

Open Abhishek-Bansode opened 1 year ago

Abhishek-Bansode commented 1 year ago

Whenever I try to set up and run the EnviroCar application on Android Studio, I encounter the following error message:

Cause: superclass access check failed: class butterknife.compiler.ButterKnifeProcessor$RScanner (in unnamed module @0x7d141519) 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 @0x7d141519

This error occurs when the butterknife library tries to access the com.sun.tools.javac.tree package, which is not exported to the unnamed module in the jdk.compiler module.

I have tried several ways to solve this issue, including updating the ButterKnife library version and checking the JDK version compatibility, but the error still persists.

I would appreciate any assistance or guidance on how to resolve this issue so that I can successfully set up and run the EnviroCar application on Android Studio.

AVD spec:- API level 30 JDK 16, also tried on JDK 17 still getting errors like mentioned.

Screenshot (584)

Screenshot (585)

SanjaySargam commented 1 year ago

You are in abhishek/dev branch Go to main branch and try once

Abhishek-Bansode commented 1 year ago

You are in abhishek/dev branch Go to main branch and try just now switched to master branch used git pull origin master and tried to run the app. But still getting same error

SanjaySargam commented 1 year ago

use git checkout main

Abhishek-Bansode commented 1 year ago

In local machine I have master branch as my main branch. As I said earlier, i already used git checkout master and then git pull origin master too. But error is not getting resolved

SebaDro commented 9 months ago

As mentioned from other users, this is very likely an issue with local cache of your IDE. Maybe, a gradle clean build will help. Otherwise, consider a fresh git clone. Therefore, I will close this for now.

SebaDro commented 9 months ago

It seems there is actually a problem when trying to build the project with JDK17 caused by missing deps that are not part of JDK17 anymore. Build with JDK11 still works, could you give it a try? However, the build of the enviroCar app is still targeted for JDK8 and there might be additional problems when building with a newer JDK version. Hence, I reopened the issue to have it on our agenda. Thanks for reporting it @Abhishek-Bansode .