-1

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
    }
}
Cœur
  • 37,241
  • 25
  • 195
  • 267
ez4nick
  • 9,756
  • 12
  • 37
  • 69

1 Answers1

0

Last time you opened the project, was it with Eclipse or IntelliJ/Android Studio? If it was in Eclipse, you can try this to migrate your project to Android Studio, which has an other project structure than Eclipse. If it was in Android Studio, the structure still looks strange to me. Can we see the build.gralde file of this project?

Gaëtan
  • 11,912
  • 7
  • 35
  • 45
  • Last time the project was opened was in intelij version 12. Im using the same computer now with the same version of intelij trying to open it. – ez4nick Apr 30 '14 at 18:00