Android Studio cannot resolve R in imported project?

后端 未结 30 2210
名媛妹妹
名媛妹妹 2020-11-30 02:27

I\'m trying the new Android Studio. I\'ve exported a project from eclipse, using the build gradle option. I\'ve then imported it in Android Studio. The R.java file under gen

30条回答
  •  渐次进展
    2020-11-30 03:04

    None of these answers helped me!

    My problem was not a problem! The program could compile completely and run on the device but the IDE has given me an annoying syntax error. It has underlined the lines of codes that included "R.".

    The way that I could solve this issue:

    I just added these three classes in "myapp/gen/com.example.app/" folder:

    BuildConfig

    package com.example.app;
    public final class BuildConfig {
        public final static boolean DEBUG = true;
    }
    

    Manifest

    package com.example.app;
    public final class Manifest {
    }
    

    R

    package com.example.app;
    public final class R {
    }
    

提交回复
热议问题