I had a project that compiled and ran fine previously and is currently distributed on google play. I haven't touched the code in at least a month and now when I open the project with intellij the entire project directory does not open, this is what I see:
https://i.stack.imgur.com/bK4dw.jpg
and the problem is that my project won't compile because it says "Package R does not exist" and I suspect this is because intellij doesn't see the folder that would normally contain the R.java file (I deleted the R.java file with the hopes of it being regenerated). As the picture shows the androidmanifest file is also not visible to intellij which I think is also part of the problem. Before trying to open this project today I don't recall having an issue like this, and since then I haven't tried opening or doing anything with the project. What could have caused this to happen, and any suggestions for how to get compiling to work properly?
Note: I have tried confirming that I am not importing android.R anywhere, and also tried doing a gradlew clean on the project but it says "No such property: files for class: org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler". Again, not sure if that could be part of the issue. I do understand an error in an xml file could cause this issue of the R file, but is it possible that the file could get corrupted on its own, without being opened by me?
Build.gradle looks like this:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5+'
}
}
apply plugin: 'android'
dependencies {
compile files('libs/android-support-v4.jar')
//compile files('libs/GoogleAdMobAds.jar')
compile files('libs/libGoogleAnalyticsV2')
compile files('libs/google-play-services.jar')
compile files 'com.android.support:appcompat-v7:+'
compile files 'com.google.android.gms:play-services:4.0.30'
compile files('libs/amazon-ads-5.1.10.jar')
}
android {
compileSdkVersion 17
buildToolsVersion "17.0.0"
defaultConfig {
minSdkVersion 7
targetSdkVersion 16
}
}