Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Troubles with Corona Native Android project
Started by thefest29 Jun 13 2018 04:51 AM

1 reply to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

thefest29

[GLOBAL: userInfoPane.html]
thefest29
  • Enthusiast

  • 50 posts
  • Corona SDK

Hello.

 

I'm new at Corona Native, so i start to learning this as described at this page https://docs.coronalabs.com/native/android/index.html.

I've installed a  Android Studio ,  copyed the App folder and selected the "android" folder via "Open an existing Android Studio Project".

 

But android studio gives an error "Error:Cannot resolve external dependency com.android.tools.build:gradle:3.0.1 because no repositories are defined.

Required by:

    project :"

 

Please help what i need to do to fix this?

 

Thank you

 

 



[TOPIC: post.html]
#2

vlads

[GLOBAL: userInfoPane.html]
vlads
  • Contributor

  • 509 posts
  • Corona Staff

Make sure your top level build.gradle script (in android studio displayed as Project:android) is something like this:

 

 
buildscript {
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1'


        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
    repositories {
        jcenter()
        google()
    }
}


allprojects {
    repositories {
        jcenter()
        google()
    }
}


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

Note repositories sections.




[topic_controls]
[/topic_controls]