Issue
Since the update to Android Studio 4.1.0 stable, all of my classes with JNI implemented functions are colored as red with code highlight.
Below you can see my project structure. There are several library projects and the main ck-learn
project. All the classes with the native code are placed in jni-wrappers
project, while CMakeLists.txt
is in a top library project peshka
which uses jni-wrappers
(see screenshot).
The syntax was colored as usual in Android Studio 4.0.2. All the classes were visible in the peshka
project. But now they are highlighted with red, as they were not found. But the projects compiles as usual. It is only a visual problem.
If I open someof the files colored in red, there is a warning:
This .java file is outside of Java source roots and won't be added to the classpath.
The source roots are standard (src\main\java
) and it all was fine in AS 4.0.2.
Can someone help with this problem?
Solution
As confirmed by the OP from the comment, this is caused by a bug in Android Studio 4.1.0, which gets partially fixed in Android Studio 4.1.1. The full fix is still in progress. More details on the symptoms and workaround can be found from this bug.
Answered By - tgeng
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.