multiple errors after opening project on different computer (and then reopening on first computer)










-1















Yesterday I opened the Android project on another computer (files were on my onedrive, so I never 'moved' the files') to show the project to someone.



Now I reopened the project on my actual computer and lots of errors are generated (see image). The project worked fine before.



They were both windows computers.
I tried resyncing the gradle and rebuilding the project but the issue persists. What did I do wrong and more importantly: how to fix it (I'm very new to Android).



The strange thing is that I can still run the app without errors.



Any suggestions?










share|improve this question
























  • Have you tried to clean the project (Build -> Clean Project) and Rebuild after that?

    – bra_racing
    Nov 13 '18 at 13:04












  • unfortunately this isn't working for me. The same problem persists

    – Fredds
    Nov 13 '18 at 13:08











  • To to File -> Sync Project with Gradle Files, see if that works :)

    – Brandon
    Nov 13 '18 at 13:12















-1















Yesterday I opened the Android project on another computer (files were on my onedrive, so I never 'moved' the files') to show the project to someone.



Now I reopened the project on my actual computer and lots of errors are generated (see image). The project worked fine before.



They were both windows computers.
I tried resyncing the gradle and rebuilding the project but the issue persists. What did I do wrong and more importantly: how to fix it (I'm very new to Android).



The strange thing is that I can still run the app without errors.



Any suggestions?










share|improve this question
























  • Have you tried to clean the project (Build -> Clean Project) and Rebuild after that?

    – bra_racing
    Nov 13 '18 at 13:04












  • unfortunately this isn't working for me. The same problem persists

    – Fredds
    Nov 13 '18 at 13:08











  • To to File -> Sync Project with Gradle Files, see if that works :)

    – Brandon
    Nov 13 '18 at 13:12













-1












-1








-1








Yesterday I opened the Android project on another computer (files were on my onedrive, so I never 'moved' the files') to show the project to someone.



Now I reopened the project on my actual computer and lots of errors are generated (see image). The project worked fine before.



They were both windows computers.
I tried resyncing the gradle and rebuilding the project but the issue persists. What did I do wrong and more importantly: how to fix it (I'm very new to Android).



The strange thing is that I can still run the app without errors.



Any suggestions?










share|improve this question
















Yesterday I opened the Android project on another computer (files were on my onedrive, so I never 'moved' the files') to show the project to someone.



Now I reopened the project on my actual computer and lots of errors are generated (see image). The project worked fine before.



They were both windows computers.
I tried resyncing the gradle and rebuilding the project but the issue persists. What did I do wrong and more importantly: how to fix it (I'm very new to Android).



The strange thing is that I can still run the app without errors.



Any suggestions?







android






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 30 '18 at 12:22







Fredds

















asked Nov 13 '18 at 12:57









FreddsFredds

298




298












  • Have you tried to clean the project (Build -> Clean Project) and Rebuild after that?

    – bra_racing
    Nov 13 '18 at 13:04












  • unfortunately this isn't working for me. The same problem persists

    – Fredds
    Nov 13 '18 at 13:08











  • To to File -> Sync Project with Gradle Files, see if that works :)

    – Brandon
    Nov 13 '18 at 13:12

















  • Have you tried to clean the project (Build -> Clean Project) and Rebuild after that?

    – bra_racing
    Nov 13 '18 at 13:04












  • unfortunately this isn't working for me. The same problem persists

    – Fredds
    Nov 13 '18 at 13:08











  • To to File -> Sync Project with Gradle Files, see if that works :)

    – Brandon
    Nov 13 '18 at 13:12
















Have you tried to clean the project (Build -> Clean Project) and Rebuild after that?

– bra_racing
Nov 13 '18 at 13:04






Have you tried to clean the project (Build -> Clean Project) and Rebuild after that?

– bra_racing
Nov 13 '18 at 13:04














unfortunately this isn't working for me. The same problem persists

– Fredds
Nov 13 '18 at 13:08





unfortunately this isn't working for me. The same problem persists

– Fredds
Nov 13 '18 at 13:08













To to File -> Sync Project with Gradle Files, see if that works :)

– Brandon
Nov 13 '18 at 13:12





To to File -> Sync Project with Gradle Files, see if that works :)

– Brandon
Nov 13 '18 at 13:12












1 Answer
1






active

oldest

votes


















1














You are missing dependencies.



From the looks of it, you are missing Android Support dependencies and
Volley



Confirm your build.gradle has the appropriate library references and repos to pull it and that the new machine has the sdk installed as well.



If you are using pre-28 I would expect to see in your parent project gradle.



// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript
repositories
google()
jcenter()


dependencies
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.71' //if using kotlin
classpath 'com.google.gms:google-services:4.1.0' //if using google services



allprojects
repositories
google()
jcenter()
mavenCentral()
maven url 'https://maven.google.com/' //older android studio
maven url "https://jitpack.io" //post api 28 needed



task clean(type: Delete)
delete rootProject.buildDir



Then in your app level build.gradle you should have dependencies to get your volley and support libraries like the following example if you are post API 28:
NOTE* If you are pre-28 then update the namespaces to non-androix pathways.



dependencies 
implementation 'com.google.firebase:firebase-crash:16.2.1' //crash reporting

//to compile @synchronized things and java references
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.0"

//Android ui support
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha2'
//Networking
implementation 'com.android.volley:volley:1.1.1'

// [START firebase]
implementation 'com.google.firebase:firebase-core:16.0.5'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation 'com.google.firebase:firebase-appindexing:16.0.2'
implementation 'com.google.android.gms:play-services-base:15.0.2'
// [END firebase]

implementation 'com.crashlytics.sdk.android:crashlytics:2.9.6'



Then whenever you open on a new machine just check that you have the SDK path accurate. For example the local.properties should never be checked into the repo as it has a hard coded path for your "local" properties.



enter image description here



Next make sure your SDK path is good in the menu, it's the folder with the 3 little blue squares:



enter image description here



If all of these are good, then do a build.clean and rebuild to see if that clears you up. If you still have issues you can try



File->Invalidate Cache and Reset



Lastly, if that still doesn't work, you may have build cache issues, so delete all your iml files, idea files, build folders and import the project fresh from code only. I'm guessing you are copying the physical folder of the project from one computer to another which would cause issues.



Hope that helps.



Happy Coding.






share|improve this answer























  • this worked for me: File->Invalidate Cache and Reset thanks a lot!!!

    – Fredds
    Nov 13 '18 at 14:49











  • no problem, happy to help.

    – Sam
    Nov 13 '18 at 16:06










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53281537%2fmultiple-errors-after-opening-project-on-different-computer-and-then-reopening%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














You are missing dependencies.



From the looks of it, you are missing Android Support dependencies and
Volley



Confirm your build.gradle has the appropriate library references and repos to pull it and that the new machine has the sdk installed as well.



If you are using pre-28 I would expect to see in your parent project gradle.



// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript
repositories
google()
jcenter()


dependencies
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.71' //if using kotlin
classpath 'com.google.gms:google-services:4.1.0' //if using google services



allprojects
repositories
google()
jcenter()
mavenCentral()
maven url 'https://maven.google.com/' //older android studio
maven url "https://jitpack.io" //post api 28 needed



task clean(type: Delete)
delete rootProject.buildDir



Then in your app level build.gradle you should have dependencies to get your volley and support libraries like the following example if you are post API 28:
NOTE* If you are pre-28 then update the namespaces to non-androix pathways.



dependencies 
implementation 'com.google.firebase:firebase-crash:16.2.1' //crash reporting

//to compile @synchronized things and java references
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.0"

//Android ui support
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha2'
//Networking
implementation 'com.android.volley:volley:1.1.1'

// [START firebase]
implementation 'com.google.firebase:firebase-core:16.0.5'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation 'com.google.firebase:firebase-appindexing:16.0.2'
implementation 'com.google.android.gms:play-services-base:15.0.2'
// [END firebase]

implementation 'com.crashlytics.sdk.android:crashlytics:2.9.6'



Then whenever you open on a new machine just check that you have the SDK path accurate. For example the local.properties should never be checked into the repo as it has a hard coded path for your "local" properties.



enter image description here



Next make sure your SDK path is good in the menu, it's the folder with the 3 little blue squares:



enter image description here



If all of these are good, then do a build.clean and rebuild to see if that clears you up. If you still have issues you can try



File->Invalidate Cache and Reset



Lastly, if that still doesn't work, you may have build cache issues, so delete all your iml files, idea files, build folders and import the project fresh from code only. I'm guessing you are copying the physical folder of the project from one computer to another which would cause issues.



Hope that helps.



Happy Coding.






share|improve this answer























  • this worked for me: File->Invalidate Cache and Reset thanks a lot!!!

    – Fredds
    Nov 13 '18 at 14:49











  • no problem, happy to help.

    – Sam
    Nov 13 '18 at 16:06















1














You are missing dependencies.



From the looks of it, you are missing Android Support dependencies and
Volley



Confirm your build.gradle has the appropriate library references and repos to pull it and that the new machine has the sdk installed as well.



If you are using pre-28 I would expect to see in your parent project gradle.



// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript
repositories
google()
jcenter()


dependencies
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.71' //if using kotlin
classpath 'com.google.gms:google-services:4.1.0' //if using google services



allprojects
repositories
google()
jcenter()
mavenCentral()
maven url 'https://maven.google.com/' //older android studio
maven url "https://jitpack.io" //post api 28 needed



task clean(type: Delete)
delete rootProject.buildDir



Then in your app level build.gradle you should have dependencies to get your volley and support libraries like the following example if you are post API 28:
NOTE* If you are pre-28 then update the namespaces to non-androix pathways.



dependencies 
implementation 'com.google.firebase:firebase-crash:16.2.1' //crash reporting

//to compile @synchronized things and java references
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.0"

//Android ui support
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha2'
//Networking
implementation 'com.android.volley:volley:1.1.1'

// [START firebase]
implementation 'com.google.firebase:firebase-core:16.0.5'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation 'com.google.firebase:firebase-appindexing:16.0.2'
implementation 'com.google.android.gms:play-services-base:15.0.2'
// [END firebase]

implementation 'com.crashlytics.sdk.android:crashlytics:2.9.6'



Then whenever you open on a new machine just check that you have the SDK path accurate. For example the local.properties should never be checked into the repo as it has a hard coded path for your "local" properties.



enter image description here



Next make sure your SDK path is good in the menu, it's the folder with the 3 little blue squares:



enter image description here



If all of these are good, then do a build.clean and rebuild to see if that clears you up. If you still have issues you can try



File->Invalidate Cache and Reset



Lastly, if that still doesn't work, you may have build cache issues, so delete all your iml files, idea files, build folders and import the project fresh from code only. I'm guessing you are copying the physical folder of the project from one computer to another which would cause issues.



Hope that helps.



Happy Coding.






share|improve this answer























  • this worked for me: File->Invalidate Cache and Reset thanks a lot!!!

    – Fredds
    Nov 13 '18 at 14:49











  • no problem, happy to help.

    – Sam
    Nov 13 '18 at 16:06













1












1








1







You are missing dependencies.



From the looks of it, you are missing Android Support dependencies and
Volley



Confirm your build.gradle has the appropriate library references and repos to pull it and that the new machine has the sdk installed as well.



If you are using pre-28 I would expect to see in your parent project gradle.



// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript
repositories
google()
jcenter()


dependencies
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.71' //if using kotlin
classpath 'com.google.gms:google-services:4.1.0' //if using google services



allprojects
repositories
google()
jcenter()
mavenCentral()
maven url 'https://maven.google.com/' //older android studio
maven url "https://jitpack.io" //post api 28 needed



task clean(type: Delete)
delete rootProject.buildDir



Then in your app level build.gradle you should have dependencies to get your volley and support libraries like the following example if you are post API 28:
NOTE* If you are pre-28 then update the namespaces to non-androix pathways.



dependencies 
implementation 'com.google.firebase:firebase-crash:16.2.1' //crash reporting

//to compile @synchronized things and java references
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.0"

//Android ui support
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha2'
//Networking
implementation 'com.android.volley:volley:1.1.1'

// [START firebase]
implementation 'com.google.firebase:firebase-core:16.0.5'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation 'com.google.firebase:firebase-appindexing:16.0.2'
implementation 'com.google.android.gms:play-services-base:15.0.2'
// [END firebase]

implementation 'com.crashlytics.sdk.android:crashlytics:2.9.6'



Then whenever you open on a new machine just check that you have the SDK path accurate. For example the local.properties should never be checked into the repo as it has a hard coded path for your "local" properties.



enter image description here



Next make sure your SDK path is good in the menu, it's the folder with the 3 little blue squares:



enter image description here



If all of these are good, then do a build.clean and rebuild to see if that clears you up. If you still have issues you can try



File->Invalidate Cache and Reset



Lastly, if that still doesn't work, you may have build cache issues, so delete all your iml files, idea files, build folders and import the project fresh from code only. I'm guessing you are copying the physical folder of the project from one computer to another which would cause issues.



Hope that helps.



Happy Coding.






share|improve this answer













You are missing dependencies.



From the looks of it, you are missing Android Support dependencies and
Volley



Confirm your build.gradle has the appropriate library references and repos to pull it and that the new machine has the sdk installed as well.



If you are using pre-28 I would expect to see in your parent project gradle.



// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript
repositories
google()
jcenter()


dependencies
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.71' //if using kotlin
classpath 'com.google.gms:google-services:4.1.0' //if using google services



allprojects
repositories
google()
jcenter()
mavenCentral()
maven url 'https://maven.google.com/' //older android studio
maven url "https://jitpack.io" //post api 28 needed



task clean(type: Delete)
delete rootProject.buildDir



Then in your app level build.gradle you should have dependencies to get your volley and support libraries like the following example if you are post API 28:
NOTE* If you are pre-28 then update the namespaces to non-androix pathways.



dependencies 
implementation 'com.google.firebase:firebase-crash:16.2.1' //crash reporting

//to compile @synchronized things and java references
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.0"

//Android ui support
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha2'
//Networking
implementation 'com.android.volley:volley:1.1.1'

// [START firebase]
implementation 'com.google.firebase:firebase-core:16.0.5'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation 'com.google.firebase:firebase-appindexing:16.0.2'
implementation 'com.google.android.gms:play-services-base:15.0.2'
// [END firebase]

implementation 'com.crashlytics.sdk.android:crashlytics:2.9.6'



Then whenever you open on a new machine just check that you have the SDK path accurate. For example the local.properties should never be checked into the repo as it has a hard coded path for your "local" properties.



enter image description here



Next make sure your SDK path is good in the menu, it's the folder with the 3 little blue squares:



enter image description here



If all of these are good, then do a build.clean and rebuild to see if that clears you up. If you still have issues you can try



File->Invalidate Cache and Reset



Lastly, if that still doesn't work, you may have build cache issues, so delete all your iml files, idea files, build folders and import the project fresh from code only. I'm guessing you are copying the physical folder of the project from one computer to another which would cause issues.



Hope that helps.



Happy Coding.







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 13 '18 at 13:52









SamSam

3,20511223




3,20511223












  • this worked for me: File->Invalidate Cache and Reset thanks a lot!!!

    – Fredds
    Nov 13 '18 at 14:49











  • no problem, happy to help.

    – Sam
    Nov 13 '18 at 16:06

















  • this worked for me: File->Invalidate Cache and Reset thanks a lot!!!

    – Fredds
    Nov 13 '18 at 14:49











  • no problem, happy to help.

    – Sam
    Nov 13 '18 at 16:06
















this worked for me: File->Invalidate Cache and Reset thanks a lot!!!

– Fredds
Nov 13 '18 at 14:49





this worked for me: File->Invalidate Cache and Reset thanks a lot!!!

– Fredds
Nov 13 '18 at 14:49













no problem, happy to help.

– Sam
Nov 13 '18 at 16:06





no problem, happy to help.

– Sam
Nov 13 '18 at 16:06



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53281537%2fmultiple-errors-after-opening-project-on-different-computer-and-then-reopening%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Use pre created SQLite database for Android project in kotlin

Darth Vader #20

Ondo