1

I've been having some struggles with building my app after Reinstalling Android Studio. The cues I've gotten have been related to either Java location or installation. With the jre already installed it seems more likely not to be an issue with JAVA.

I've tried importing my project, copy and pasting from .txt files, reinstalling java, redefining java PATH, changing build dependencies, downloading command line sdk manager to build outside of the ide, erasing build caches, and I also let Android Studio rewrite properties.profile when importing Android Studio Project.

Another strange thing, when I create a directory in the project structure it shows up when the ide is initiating before gradle builds. After gradle builds the folder is no longer visible.

EDIT

error: package R does not exist
error: cannot find symbol class appcompat

UPDATE

This seems like a common problem. I've tried to follow most of the current questions on java incompatiblity but still haven't come up with a work around. I downloaded oracle's jdk (unnecessarily) and pointed the studio project at it. Created a shortcut using the jdk java.exe and placed it in Studio core, added java to the PATH which allowed gradlew build in the terminal to initiate but not complete. What are the next steps?

UPDATE

Just in case somebody else stumbles onto this. This post and also this one got me there. The fix ended up being an import of the .R file. com.example.android.recyclerview.R Hope it can help

  • It would be helpful to at least include the error (message) you encountered. – Stephan Jul 29 '17 at 22:42
  • Did you reinstall the Android SDK? – Cyprien Aubry Jul 30 '17 at 02:28
  • I did current Android SDK: 8.0 (O) partial install; platform & google api... 7.0(Nougat) installed; platform, sources & google api...Build Tools; 25.0.3, 26.0.0, 26.0.1...Platform-Tools; 26.0.0...Constraint Layout 1.0.2...Solver 1.0.2...Tools 26.0.2...Android Repository 47.0...Google Repository 57 – HatmanStack Jul 30 '17 at 16:36
  • After successful Gradle build IDE Fatal Errors NullPointerException during symbol building (rebuildModuleMaps) I've assembled from the terminal with gradlew build, doesn't work anymore. Could it be something to do with Android and Gradle plugins? – HatmanStack Jul 30 '17 at 19:35
  • Yes, are you sure you have downloaded the correct SDK, BuildTools, ...? They need to be the same as the one you're building your app against. Otherwise it's not gonna work. But generally Android Studio gives you clues in the error messages – Eselfar Jul 31 '17 at 15:12

0 Answers0