1

Topic: IntelliJ IDEA. cannot resolve symbol ' AppCompatActivity'

Created new project Android.
All source code is highlit red and writes:
IntelliJ IDEA. cannot resolve symbol ' AppCompatActivity'
In window Messages it is empty.
What did I make not so?

2

Re: IntelliJ IDEA. cannot resolve symbol ' AppCompatActivity'

It is necessary to add in dependence appcompat.

3

Re: IntelliJ IDEA. cannot resolve symbol ' AppCompatActivity'

wadman;
In build.gradle already there are such lines (are created automatically):
dependencies {
compile fileTree (dir: ' libs', include: ['*.jar '])
testCompile ' junit:junit:4.12'
compile ' com.android.support:appcompat-v7:26. +'
compile ' com.android.support:design:26. +'
}
But the environment swears on them:
Error: (24, 13) Failed to resolve: com.android.support:appcompat-v7:26. +
<a href = "install.m2.repo"> Install Repository and sync project </a> <br> <a href = "openFile:D:/Android/workspace/TestAppCompat/app/build.gradle"> Show in File </a>

4

Re: IntelliJ IDEA. cannot resolve symbol ' AppCompatActivity'

Clicked a line and the utility was installed.
But now swears so:
Error:The supplied javaHome seems to be invalid. I cannot find the java executable. Tried location: D:\Android\adt-bundle-windows-x86-20131030\sdk\bin\java.exe
Where to the environment to specify not a file java.exe?

5

Re: IntelliJ IDEA. cannot resolve symbol ' AppCompatActivity'

Look in environment variables.

6

Re: IntelliJ IDEA. cannot resolve symbol ' AppCompatActivity'

wadman wrote:

Look in environment variables. [/quot
Thanks.
But now it is necessary to understand with "cannot resolve symbol R".
Like all checked up in project adjustments, but did not find the reason.

7

Re: IntelliJ IDEA. cannot resolve symbol ' AppCompatActivity'

Slon747 wrote:

"cannot resolve symbol R"

I can tell only that this class is generated "on the fly", in its project should not be.

Posts [ 7 ]

Pages 1

You must login or register to post a reply