Skip to content

Snappy1

  • Home
  • Android
  • What
  • How
  • Is
  • Can
  • Does
  • Do
  • Why
  • Are
  • Who
  • Toggle search form

[FIXED] java – Android Studio error when trying to copy and rebuild project

Posted on November 11, 2022 By

Solution 1 :

Ok, i understand your problem but not completely. I want to give my advise to you, when you import any outer project to android studio, you should do it indirectly. To solve any kind of gradle or build error, you can do it, it is very simple.

  1. Make a empty project using android studio and close it
  2. Copy all class and res folder from your project what you want to import it to android studio to your new created empty project
  3. Now import new project rather than your old project

Problem :

I’m trying to copy and build a different project so that I can change a few things for a practice problem in the Android Dev tutorials. I’ve gone ahead and followed both the guide on how to copy a project here: https://google-developer-training.github.io/android-developer-fundamentals-course-concepts-v2/appendix/appendix-utilities/appendix-utilities.html

and a.t.’s answer here: Copy existing project with a new name in Android Studio

but both have failed me after multiple tries.

Here is where I get an error,at step 11 on a.t.’s answer when I go to sync gradle files, after I’ve changed the name of the project elsewhere, it gives me these 2 errors:

org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all artifacts for configuration ':classpath'.

org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find com.HelloToast3.tools.build:gradle:3.6.3.

This is my project build.gradle and my Module App build.gradle respectively


buildscript {

    repositories {
        google()
        jcenter()

    }
    dependencies {
        classpath 'com.HelloToast3.tools.build:gradle:3.6.3'


        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()

    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

apply plugin: 'com.HelloToast3.application'

android {
    compileSdkVersion 29
    buildToolsVersion "29.0.3"

    defaultConfig {
        applicationId "com.example.HelloToast3"
        minSdkVersion 15
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-HelloToast3-optimize.txt'), 'proguard-rules.pro'
        }
    }

}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])

    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}

I’m new to android studio, maybe this is a simple fix but I can’t find the solution yet. Thanks for all the help.

READ  [FIXED] android - Proper usage of EncryptedSharedPreferences
Powered by Inline Related Posts
Android Tags:android, android-studio, gradle, java

Post navigation

Previous Post: [FIXED] java – How can I solve this Android Studio Firebase problem?
Next Post: [FIXED] Android Java Publish result cast issue at MyCustomAdapter.java

Related Posts

[FIXED] android – ignore too much taken space in new line in flutter Android
[FIXED] svg – Importing Vector Asset into Android Studio Android
[FIXED] android – Instrumented Testing with Dagger2 – how to reference fake repository? Android
[FIXED] kotlin – Abstract room database implementation not found dagger hilt Android
[FIXED] cmd – Android development environment set up issue came while trying to run react native app Android
[FIXED] android – Firebase firestore variable name changed Android

Archives

  • April 2023
  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022

Categories

  • ¿Cómo
  • ¿Cuál
  • ¿Cuándo
  • ¿Cuántas
  • ¿Cuánto
  • ¿Qué
  • Android
  • Are
  • At
  • C'est
  • Can
  • Comment
  • Did
  • Do
  • Does
  • Est-ce
  • Est-il
  • For
  • Has
  • Hat
  • How
  • In
  • Is
  • Ist
  • Kann
  • Où
  • Pourquoi
  • Quand
  • Quel
  • Quelle
  • Quelles
  • Quels
  • Qui
  • Should
  • Sind
  • Sollte
  • Uncategorized
  • Wann
  • Warum
  • Was
  • Welche
  • Welchen
  • Welcher
  • Welches
  • Were
  • What
  • What's
  • When
  • Where
  • Which
  • Who
  • Who's
  • Why
  • Wie
  • Will
  • Wird
  • Wo
  • Woher
  • you can create a selvedge edge: You can make the edges of garter stitch more smooth by slipping the first stitch of every row.2022-02-04
  • you really only need to know two patterns: garter stitch

Recent Posts

  • Can Vicks humidifier be used without filter?
  • What color is Spanish green?
  • How old is Jamie in The War That Saved My Life?
  • When should I use scalp massager for hair growth?
  • Can I put polyurethane over liming wax?

Recent Comments

No comments to show.

Copyright © 2023 Snappy1.

Powered by PressBook Grid Dark theme