Уже 3 месяца я сталкиваюсь с постоянным сбоем сборки Gradle при попытке интегрировать Tuya SmartLife App SDK для Android. Основная зависимость не может быть решена. Я использую React Native (Expo). Я использую собственный мост для выполнения собственных функций Android Tuya SDK, настроенных в папке android/.
Вы найдете мой код ниже:
Ошибка:
Could not determine the dependencies of task ':app:mergeReleaseNativeLibs'.
> Could not resolve all dependencies for configuration ':app:releaseRuntimeClasspath'.
> Could not resolve all dependencies for configuration ':app:releaseRuntimeClasspath'.
> Could not find com.thingclips.smart:thingsmart:6.11.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2 ... 6.11.0.pom
- https://repo.maven.apache.org/maven2/co ... 6.11.0.pom
- https://www.jitpack.io/com/thingclips/s ... 6.11.0.pom
- https://maven-other.tuya.com/repository ... 6.11.0.pom
- https://central.sonatype.com/repository ... 6.11.0.pom
Required by:
project :app
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/usergui ... ories.html
android/build.gradle:
buildscript {
repositories {
google()
mavenCentral()
maven { url 'https://www.jitpack.io' }
maven { url 'https://maven-other.tuya.com/repository/maven-releases/' }
}
dependencies {
classpath('com.android.tools.build:gradle')
classpath('com.facebook.react:react-native-gradle-plugin')
classpath('org.jetbrains.kotlin:kotlin-gradle-plugin')
}
}
allprojects {
repositories {
google()
mavenCentral()
maven { url 'https://www.jitpack.io' }
maven { url 'https://maven-other.tuya.com/repository/maven-releases/' }
}
}
apply plugin: "expo-root-project"
apply plugin: "com.facebook.react.rootproject"
android/settings.gradle:
pluginManagement {
repositories {
google()
mavenCentral()
gradlePluginPortal()
maven { url 'https://maven-other.tuya.com/repository/maven-releases/' }
}
def reactNativeGradlePlugin = new File(
providers.exec {
workingDir(rootDir)
commandLine("node", "--print", "require.resolve('@react-native/gradle-plugin/package.json', { paths: [require.resolve('react-native/package.json')] })")
}.standardOutput.asText.get().trim()
).getParentFile().absolutePath
includeBuild(reactNativeGradlePlugin)
def expoPluginsPath = new File(
providers.exec {
workingDir(rootDir)
commandLine("node", "--print", "require.resolve('expo-modules-autolinking/package.json', { paths: [require.resolve('expo/package.json')] })")
}.standardOutput.asText.get().trim(),
"../android/expo-gradle-plugin"
).absolutePath
includeBuild(expoPluginsPath)
}
plugins {
id("com.facebook.react.settings")
id("expo-autolinking-settings")
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.PREFER_PROJECT)
repositories {
google()
mavenCentral()
maven { url 'https://www.jitpack.io' }
maven { url 'https://maven-other.tuya.com/repository/maven-releases/' }
}
}
extensions.configure(com.facebook.react.ReactSettingsExtension) { ex ->
if (System.getenv('EXPO_USE_COMMUNITY_AUTOLINKING') == '1') {
ex.autolinkLibrariesFromCommand()
} else {
ex.autolinkLibrariesFromCommand(expoAutolinking.rnConfigCommand)
}
}
expoAutolinking.useExpoModules()
rootProject.name = 'PowUp'
expoAutolinking.useExpoVersionCatalog()
include ':app'
includeBuild(expoAutolinking.reactNativeGradlePlugin)
android/app/build.gradle:
apply plugin: "com.android.application"
apply plugin: "org.jetbrains.kotlin.android"
apply plugin: "com.facebook.react"
def projectRoot = rootDir.getAbsoluteFile().getParentFile().getAbsolutePath()
react {
entryFile = file(["node", "-e", "require('expo/scripts/resolveAppEntry')", projectRoot, "android", "absolute"].execute(null, rootDir).text.trim())
reactNativeDir = new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsoluteFile()
hermesCommand = new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsolutePath() + "/sdks/hermesc/%OS-BIN%/hermesc"
codegenDir = new File(["node", "--print", "require.resolve('@react-native/codegen/package.json', { paths: [require.resolve('react-native/package.json')] })"].execute(null, rootDir).text.trim()).getParentFile().getAbsoluteFile()
enableBundleCompression = (findProperty('android.enableBundleCompression') ?: false).toBoolean()
cliFile = new File(["node", "--print", "require.resolve('@expo/cli', { paths: [require.resolve('expo/package.json')] })"].execute(null, rootDir).text.trim())
bundleCommand = "export:embed"
autolinkLibrariesWithApp()
}
def enableMinifyInReleaseBuilds = (findProperty('android.enableMinifyInReleaseBuilds') ?: false).toBoolean()
def jscFlavor = 'io.github.react-native-community:jsc-android:2026004.+'
android {
ndkVersion rootProject.ext.ndkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
compileSdk rootProject.ext.compileSdkVersion
namespace 'com.arlux.powup'
defaultConfig {
applicationId 'com.arlux.powup'
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0.0"
buildConfigField "String", "REACT_NATIVE_RELEASE_LEVEL", "\"${findProperty('reactNativeReleaseLevel') ?: 'stable'}\""
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withInputStream { localProperties.load(it) }
}
def tuyaAppKey = localProperties.getProperty('TUYA_ANDROID_APP_KEY')
?: findProperty('EXPO_PUBLIC_TUYA_ANDROID_APP_KEY')
?: findProperty('TUYA_ANDROID_APP_KEY')
?: System.getenv('EXPO_PUBLIC_TUYA_ANDROID_APP_KEY')
def tuyaAppSecret = localProperties.getProperty('TUYA_ANDROID_APP_SECRET')
?: findProperty('EXPO_PUBLIC_TUYA_ANDROID_APP_SECRET')
?: findProperty('TUYA_ANDROID_APP_SECRET')
?: System.getenv('EXPO_PUBLIC_TUYA_ANDROID_APP_SECRET')
if (!tuyaAppKey || !tuyaAppSecret) {
throw new GradleException("Variables Tuya manquantes!\n" +
"Ajoutez-les dans android/local.properties:\n" +
"TUYA_ANDROID_APP_KEY=votre_app_key\n" +
"TUYA_ANDROID_APP_SECRET=votre_app_secret")
}
buildConfigField "String", "TUYA_APP_KEY", "\"${tuyaAppKey}\""
buildConfigField "String", "TUYA_APP_SECRET", "\"${tuyaAppSecret}\""
manifestPlaceholders = [
TUYA_APP_KEY: tuyaAppKey,
TUYA_APP_SECRET: tuyaAppSecret
]
ndk {
abiFilters "armeabi-v7a", "arm64-v8a"
}
}
signingConfigs {
debug {
storeFile file('debug.keystore')
storePassword 'android'
keyAlias 'androiddebugkey'
keyPassword 'android'
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
signingConfig signingConfigs.debug
def enableShrinkResources = findProperty('android.enableShrinkResourcesInReleaseBuilds') ?: 'false'
shrinkResources enableShrinkResources.toBoolean()
minifyEnabled enableMinifyInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
def enablePngCrunchInRelease = findProperty('android.enablePngCrunchInReleaseBuilds') ?: 'true'
crunchPngs enablePngCrunchInRelease.toBoolean()
}
}
packagingOptions {
pickFirst 'lib/*/libc++_shared.so'
jniLibs {
def enableLegacyPackaging = findProperty('expo.useLegacyPackaging') ?: 'false'
useLegacyPackaging enableLegacyPackaging.toBoolean()
}
}
androidResources {
ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~'
}
}
configurations.all {
exclude group: "com.thingclips.smart", module: 'thingsmart-modularCampAnno'
}
["pickFirsts", "excludes", "merges", "doNotStrip"].each { prop ->
def options = (findProperty("android.packagingOptions.$prop") ?: "").split(",");
for (i in 0.. 0) {
println "android.packagingOptions.$prop += $options ($options.length)"
options.each {
android.packagingOptions[prop] += it
}
}
}
dependencies {
implementation("com.facebook.react:react-android")
def isGifEnabled = (findProperty('expo.gif.enabled') ?: "") == "true";
def isWebpEnabled = (findProperty('expo.webp.enabled') ?: "") == "true";
def isWebpAnimatedEnabled = (findProperty('expo.webp.animated') ?: "") == "true";
if (isGifEnabled) {
implementation("com.facebook.fresco:animated-gif:${expoLibs.versions.fresco.get()}")
}
if (isWebpEnabled) {
implementation("com.facebook.fresco:webpsupport:${expoLibs.versions.fresco.get()}")
if (isWebpAnimatedEnabled) {
implementation("com.facebook.fresco:animated-webp:${expoLibs.versions.fresco.get()}")
}
}
if (hermesEnabled.toBoolean()) {
implementation("com.facebook.react:hermes-android")
} else {
implementation jscFlavor
}
implementation files('libs/security-algorithm/security-algorithm-1.0.0-beta.aar')
implementation 'com.alibaba:fastjson:1.1.67.android'
implementation 'com.squareup.okhttp3:okhttp-urlconnection:3.14.9'
implementation 'com.thingclips.smart:thingsmart:6.11.0'
}
Подробнее здесь: https://stackoverflow.com/questions/798 ... tory-issue
Gradle не удается найти Tuya SDK 6.11.1 (com.thingclips.smart) – проблема с репозиторием? ⇐ JAVA
Программисты JAVA общаются здесь
1765712153
Anonymous
Уже 3 месяца я сталкиваюсь с постоянным сбоем сборки Gradle при попытке интегрировать Tuya SmartLife App SDK для Android. Основная зависимость не может быть решена. Я использую React Native (Expo). Я использую собственный мост для выполнения собственных функций Android Tuya SDK, настроенных в папке android/.
Вы найдете мой код ниже:
Ошибка:
Could not determine the dependencies of task ':app:mergeReleaseNativeLibs'.
> Could not resolve all dependencies for configuration ':app:releaseRuntimeClasspath'.
> Could not resolve all dependencies for configuration ':app:releaseRuntimeClasspath'.
> Could not find com.thingclips.smart:thingsmart:6.11.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/thingclips/smart/thingsmart/6.11.0/thingsmart-6.11.0.pom
- https://repo.maven.apache.org/maven2/com/thingclips/smart/thingsmart/6.11.0/thingsmart-6.11.0.pom
- https://www.jitpack.io/com/thingclips/smart/thingsmart/6.11.0/thingsmart-6.11.0.pom
- https://maven-other.tuya.com/repository/maven-releases/com/thingclips/smart/thingsmart/6.11.0/thingsmart-6.11.0.pom
- https://central.sonatype.com/repository/maven-snapshots/com/thingclips/smart/thingsmart/6.11.0/thingsmart-6.11.0.pom
Required by:
project :app
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
android/build.gradle:
buildscript {
repositories {
google()
mavenCentral()
maven { url 'https://www.jitpack.io' }
maven { url 'https://maven-other.tuya.com/repository/maven-releases/' }
}
dependencies {
classpath('com.android.tools.build:gradle')
classpath('com.facebook.react:react-native-gradle-plugin')
classpath('org.jetbrains.kotlin:kotlin-gradle-plugin')
}
}
allprojects {
repositories {
google()
mavenCentral()
maven { url 'https://www.jitpack.io' }
maven { url 'https://maven-other.tuya.com/repository/maven-releases/' }
}
}
apply plugin: "expo-root-project"
apply plugin: "com.facebook.react.rootproject"
android/settings.gradle:
pluginManagement {
repositories {
google()
mavenCentral()
gradlePluginPortal()
maven { url 'https://maven-other.tuya.com/repository/maven-releases/' }
}
def reactNativeGradlePlugin = new File(
providers.exec {
workingDir(rootDir)
commandLine("node", "--print", "require.resolve('@react-native/gradle-plugin/package.json', { paths: [require.resolve('react-native/package.json')] })")
}.standardOutput.asText.get().trim()
).getParentFile().absolutePath
includeBuild(reactNativeGradlePlugin)
def expoPluginsPath = new File(
providers.exec {
workingDir(rootDir)
commandLine("node", "--print", "require.resolve('expo-modules-autolinking/package.json', { paths: [require.resolve('expo/package.json')] })")
}.standardOutput.asText.get().trim(),
"../android/expo-gradle-plugin"
).absolutePath
includeBuild(expoPluginsPath)
}
plugins {
id("com.facebook.react.settings")
id("expo-autolinking-settings")
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.PREFER_PROJECT)
repositories {
google()
mavenCentral()
maven { url 'https://www.jitpack.io' }
maven { url 'https://maven-other.tuya.com/repository/maven-releases/' }
}
}
extensions.configure(com.facebook.react.ReactSettingsExtension) { ex ->
if (System.getenv('EXPO_USE_COMMUNITY_AUTOLINKING') == '1') {
ex.autolinkLibrariesFromCommand()
} else {
ex.autolinkLibrariesFromCommand(expoAutolinking.rnConfigCommand)
}
}
expoAutolinking.useExpoModules()
rootProject.name = 'PowUp'
expoAutolinking.useExpoVersionCatalog()
include ':app'
includeBuild(expoAutolinking.reactNativeGradlePlugin)
android/app/build.gradle:
apply plugin: "com.android.application"
apply plugin: "org.jetbrains.kotlin.android"
apply plugin: "com.facebook.react"
def projectRoot = rootDir.getAbsoluteFile().getParentFile().getAbsolutePath()
react {
entryFile = file(["node", "-e", "require('expo/scripts/resolveAppEntry')", projectRoot, "android", "absolute"].execute(null, rootDir).text.trim())
reactNativeDir = new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsoluteFile()
hermesCommand = new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim()).getParentFile().getAbsolutePath() + "/sdks/hermesc/%OS-BIN%/hermesc"
codegenDir = new File(["node", "--print", "require.resolve('@react-native/codegen/package.json', { paths: [require.resolve('react-native/package.json')] })"].execute(null, rootDir).text.trim()).getParentFile().getAbsoluteFile()
enableBundleCompression = (findProperty('android.enableBundleCompression') ?: false).toBoolean()
cliFile = new File(["node", "--print", "require.resolve('@expo/cli', { paths: [require.resolve('expo/package.json')] })"].execute(null, rootDir).text.trim())
bundleCommand = "export:embed"
autolinkLibrariesWithApp()
}
def enableMinifyInReleaseBuilds = (findProperty('android.enableMinifyInReleaseBuilds') ?: false).toBoolean()
def jscFlavor = 'io.github.react-native-community:jsc-android:2026004.+'
android {
ndkVersion rootProject.ext.ndkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
compileSdk rootProject.ext.compileSdkVersion
namespace 'com.arlux.powup'
defaultConfig {
applicationId 'com.arlux.powup'
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0.0"
buildConfigField "String", "REACT_NATIVE_RELEASE_LEVEL", "\"${findProperty('reactNativeReleaseLevel') ?: 'stable'}\""
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withInputStream { localProperties.load(it) }
}
def tuyaAppKey = localProperties.getProperty('TUYA_ANDROID_APP_KEY')
?: findProperty('EXPO_PUBLIC_TUYA_ANDROID_APP_KEY')
?: findProperty('TUYA_ANDROID_APP_KEY')
?: System.getenv('EXPO_PUBLIC_TUYA_ANDROID_APP_KEY')
def tuyaAppSecret = localProperties.getProperty('TUYA_ANDROID_APP_SECRET')
?: findProperty('EXPO_PUBLIC_TUYA_ANDROID_APP_SECRET')
?: findProperty('TUYA_ANDROID_APP_SECRET')
?: System.getenv('EXPO_PUBLIC_TUYA_ANDROID_APP_SECRET')
if (!tuyaAppKey || !tuyaAppSecret) {
throw new GradleException("Variables Tuya manquantes!\n" +
"Ajoutez-les dans android/local.properties:\n" +
"TUYA_ANDROID_APP_KEY=votre_app_key\n" +
"TUYA_ANDROID_APP_SECRET=votre_app_secret")
}
buildConfigField "String", "TUYA_APP_KEY", "\"${tuyaAppKey}\""
buildConfigField "String", "TUYA_APP_SECRET", "\"${tuyaAppSecret}\""
manifestPlaceholders = [
TUYA_APP_KEY: tuyaAppKey,
TUYA_APP_SECRET: tuyaAppSecret
]
ndk {
abiFilters "armeabi-v7a", "arm64-v8a"
}
}
signingConfigs {
debug {
storeFile file('debug.keystore')
storePassword 'android'
keyAlias 'androiddebugkey'
keyPassword 'android'
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
signingConfig signingConfigs.debug
def enableShrinkResources = findProperty('android.enableShrinkResourcesInReleaseBuilds') ?: 'false'
shrinkResources enableShrinkResources.toBoolean()
minifyEnabled enableMinifyInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
def enablePngCrunchInRelease = findProperty('android.enablePngCrunchInReleaseBuilds') ?: 'true'
crunchPngs enablePngCrunchInRelease.toBoolean()
}
}
packagingOptions {
pickFirst 'lib/*/libc++_shared.so'
jniLibs {
def enableLegacyPackaging = findProperty('expo.useLegacyPackaging') ?: 'false'
useLegacyPackaging enableLegacyPackaging.toBoolean()
}
}
androidResources {
ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~'
}
}
configurations.all {
exclude group: "com.thingclips.smart", module: 'thingsmart-modularCampAnno'
}
["pickFirsts", "excludes", "merges", "doNotStrip"].each { prop ->
def options = (findProperty("android.packagingOptions.$prop") ?: "").split(",");
for (i in 0.. 0) {
println "android.packagingOptions.$prop += $options ($options.length)"
options.each {
android.packagingOptions[prop] += it
}
}
}
dependencies {
implementation("com.facebook.react:react-android")
def isGifEnabled = (findProperty('expo.gif.enabled') ?: "") == "true";
def isWebpEnabled = (findProperty('expo.webp.enabled') ?: "") == "true";
def isWebpAnimatedEnabled = (findProperty('expo.webp.animated') ?: "") == "true";
if (isGifEnabled) {
implementation("com.facebook.fresco:animated-gif:${expoLibs.versions.fresco.get()}")
}
if (isWebpEnabled) {
implementation("com.facebook.fresco:webpsupport:${expoLibs.versions.fresco.get()}")
if (isWebpAnimatedEnabled) {
implementation("com.facebook.fresco:animated-webp:${expoLibs.versions.fresco.get()}")
}
}
if (hermesEnabled.toBoolean()) {
implementation("com.facebook.react:hermes-android")
} else {
implementation jscFlavor
}
implementation files('libs/security-algorithm/security-algorithm-1.0.0-beta.aar')
implementation 'com.alibaba:fastjson:1.1.67.android'
implementation 'com.squareup.okhttp3:okhttp-urlconnection:3.14.9'
implementation 'com.thingclips.smart:thingsmart:6.11.0'
}
Подробнее здесь: [url]https://stackoverflow.com/questions/79842362/gradle-fails-to-find-tuya-sdk-6-11-1-com-thingclips-smart-repository-issue[/url]
Ответить
1 сообщение
• Страница 1 из 1
Перейти
- Кемерово-IT
- ↳ Javascript
- ↳ C#
- ↳ JAVA
- ↳ Elasticsearch aggregation
- ↳ Python
- ↳ Php
- ↳ Android
- ↳ Html
- ↳ Jquery
- ↳ C++
- ↳ IOS
- ↳ CSS
- ↳ Excel
- ↳ Linux
- ↳ Apache
- ↳ MySql
- Детский мир
- Для души
- ↳ Музыкальные инструменты даром
- ↳ Печатная продукция даром
- Внешняя красота и здоровье
- ↳ Одежда и обувь для взрослых даром
- ↳ Товары для здоровья
- ↳ Физкультура и спорт
- Техника - даром!
- ↳ Автомобилистам
- ↳ Компьютерная техника
- ↳ Плиты: газовые и электрические
- ↳ Холодильники
- ↳ Стиральные машины
- ↳ Телевизоры
- ↳ Телефоны, смартфоны, плашеты
- ↳ Швейные машинки
- ↳ Прочая электроника и техника
- ↳ Фототехника
- Ремонт и интерьер
- ↳ Стройматериалы, инструмент
- ↳ Мебель и предметы интерьера даром
- ↳ Cантехника
- Другие темы
- ↳ Разное даром
- ↳ Давай меняться!
- ↳ Отдам\возьму за копеечку
- ↳ Работа и подработка в Кемерове
- ↳ Давай с тобой поговорим...
Мобильная версия