ujjwal gupta
ujjwal gupta

Reputation: 101

Use Android Studio project on different OS

I am working on a android project with my friend. He uses windows while I am an Ubuntu user. This is the process that i followed to collaborate with him.

He created a new project and uploaded that project on Github. I forked his repository and cloned that repo on my Ubuntu. Then I opened Android Studio and imported the project . Now i set up origin as my repo and upstream as his repo using the console inside android studio. The project is working fine but as soon as I open any java file in the project ,the compliler goes insane. Now the compiler does not recognize AppCombatAcivity Class and any other library class.

How do I fix this problem ? And is this problem due to change in OS or change in .gitignore.

The gitignore from my friends project looks like the following:

.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build`

Upvotes: 1

Views: 377

Answers (2)

Gokul Nath KP
Gokul Nath KP

Reputation: 15574

Maybe you don't have the same SDKs and Build tools. Install required build tools, platform tools and SDKs

Try clean build or delete build folder from project. And remove local.properties, which maybe pointing to your friend's SDK path, and also .gradle and .idea folders.

Also check your JDK version.

Upvotes: 0

Jhinseok LEE
Jhinseok LEE

Reputation: 11

Seems like you didn't put build folder in your .gitignore file. Normally you should also put those as well in your .gitignore

.idea
*.iml
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.DS_Store
/build
/captures
.externalNativeBuild

Upvotes: 1

Related Questions