Closed nashihu closed 2 years ago
@nashihu Thank you for your question, we confirmed the product has been released to the public, please check your network, try to change the network.
hello,, i have tried using one of official ISP in Indonesia, and also using VPN by CloudFlare, but it doesn't work either.. do you have any suggestion , thank you..
@nashihu You need to add closures "allprojects" like this in your build.gradle project ,not only in the "buildscript": allprojects { repositories { maven { url 'https://maven-other.tuya.com/repository/maven-releases/' } google() jcenter() } }
i'm using latest Android Studio. the new project template got me wrong
when i add allprojects { ... }
inside build.gradle
project level, i got error message
Caused by: org.gradle.api.InvalidUserCodeException: Build was configured to prefer settings repositories over project repositories but repository 'maven' was added by build file 'build.gradle'
after following this , it works now
thanks for your response
i can't sync gradle, it can't resolve the dependency,
build.gradle project level
``` // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { google() mavenCentral() maven { url "https://maven-other.tuya.com/repository/maven-releases/" } } dependencies { classpath "com.android.tools.build:gradle:7.0.4" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10" } } task clean(type: Delete) { delete rootProject.buildDir } ```
build.gradle app level
``` plugins { id 'com.android.application' id 'kotlin-android' } android { compileSdk 31 defaultConfig { applicationId "com.example.app" minSdk 21 targetSdk 31 versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } signingConfigs { release { storeFile file("~/general.keystore") storePassword "general" keyAlias "general" keyPassword "general" v1SigningEnabled true v2SigningEnabled true } debug { storeFile file("~/general.keystore") storePassword "general" keyAlias "general" keyPassword "general" v1SigningEnabled true v2SigningEnabled true } } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } kotlinOptions { jvmTarget = '1.8' } } dependencies { implementation 'androidx.core:core-ktx:1.7.0' implementation 'androidx.appcompat:appcompat:1.4.0' implementation 'com.google.android.material:material:1.4.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.2' implementation 'com.tuya.smart:iot-app-sdk:1.0.2' // TODO ini testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.1.3' androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' } ```
when i sync gradle i got message
thank you