Я застрял с интеграцией и настройкой Zoom Android SDK в свой проект флаттера.Android

Форум для тех, кто программирует под Android
Ответить Пред. темаСлед. тема
Anonymous
 Я застрял с интеграцией и настройкой Zoom Android SDK в свой проект флаттера.

Сообщение Anonymous »

Я пытался интегрировать Android Zoom SDK в свой проект Flutter. В целом я хочу встроить их Zoom SDK в свой проект Flutter.
Я знаю, что существует Zoom SDK для Flutter, и я мог бы его использовать. Но некоторые функции там недоступны, поскольку они все еще находятся в разработке. Поэтому я подумал о внедрении Native SDK в свой проект.
Я постоянно сталкиваюсь с этой проблемой:
FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
> Could not resolve project :zoom_module.
Required by:
project :app
> No matching configuration of project :zoom_module was found. The consumer was configured to find an API of a component, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '7.3.0', attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' but:
- None of the consumable configurations have attributes.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 6s
Error: Gradle task assembleDebug failed with exit code 1


Я хочу использовать этот SDK в собственном коде моего проекта Flutter.
Я загрузил масштабирование SDK и успешно запустил его в Android Studio.
Это включало генерацию токенов, секретных и открытых ключей.
Я настроил каналы платформы, и они, похоже, работают нормально.< /p>
Затем я скопировал весь SDK и попытался добавить его как отдельный модуль.
Именно здесь я постоянно сталкиваюсь с вышеупомянутой проблемой.
Нет четких руководств или документации о том, как это сделать.
Я попробовал несколько исправлений, которые нашел здесь. Но они были слишком общими.
Это файл build.gradle внутри каталога android/app моего проекта flutter:
plugins {
id "com.android.application"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

android {
namespace "com.example.zoom_integration"
compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/bu ... on-id.html).
applicationId "com.example.zoom_integration"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/and ... figuration.
minSdkVersion flutter.minSdkVersion
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName

}

buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}

dependencies {
implementation project (':zoom_module')
}

}

flutter {
source '../..'
}


А это файл settings.gradle внутри моего каталога android моего проекта флаттера:
pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}
settings.ext.flutterSdkPath = flutterSdkPath()

includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")

repositories {
google()
mavenCentral()
gradlePluginPortal()
}

plugins {
id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false
}
}

plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.0" apply false
}

include ':app', ':zoom_module'


А это файл MainActivity.java:
package com.example.zoom_integration;

import android.widget.Toast;

import androidx.annotation.NonNull;

import io.flutter.embedding.android.FlutterActivity;
import io.flutter.embedding.engine.FlutterEngine;
import io.flutter.plugin.common.MethodCall;
import io.flutter.plugin.common.MethodChannel;

public class MainActivity extends FlutterActivity {

private final String channelName = "com.example.zoom_integration/zoom";

@Override
public void configureFlutterEngine(@NonNull FlutterEngine flutterEngine) {
super.configureFlutterEngine(flutterEngine);

MethodChannel channel = new MethodChannel(flutterEngine.getDartExecutor().getBinaryMessenger(), channelName);

channel.setMethodCallHandler(new MethodChannel.MethodCallHandler() {
@Override
public void onMethodCall(MethodCall call, MethodChannel.Result result) {

// Your implementation from step 1 goes here
if(call.method.equals("onClickJoinMeeting")) {
showToast("Api Devvvss");
}

}
});

}

private void showToast(String message) {
Toast.makeText(MainActivity.this, message, Toast.LENGTH_SHORT).show();
}

public void onMethodCall(MethodCall call, MethodChannel.Result result) {
// Handle the method call based on `call.method` and `call.arguments`
// You can use a switch statement or other logic to handle different methods
// Send a response using `result.success(data)` or `result.error(code, message, details)`
}
}


Это структура моей папки:
📦zoom_integration
📂.dart_tool
📂.idea
📂android
┃ ┣ 📂.gradle
┃ ┣ 📂.idea
┃ ┣ 📂app
┃ ┣ 📂gradle
┃ ┣ 📂zoom_module
┃ ┃ ┣ 📂dynamic_sample
┃ ┃ ┣ 📂example2
┃ ┃ ┣ 📂feature_mobilertc
┃ ┃ ┣ 📂gradle
┃ ┃ ┣ 📂mobilertc
┃ ┃ ┣ 📂sample
┃ ┃ ┣ 📜build.gradle
┃ ┃ ┣ 📜gradle.properties
┃ ┃ ┣ 📜gradlew
┃ ┃ ┣ 📜gradlew.bat
┃ ┃ ┣ 📜lock_dependency.md
┃ ┃ ┗ 📜settings.gradle
┃ ┣ 📜.gitignore
┃ ┣ 📜build.gradle
┃ ┣ 📜gradle.properties
┃ ┣ 📜gradlew
┃ ┣ 📜gradlew.bat
┃ ┣ 📜local.properties
┃ ┣ 📜settings.gradle
┃ ┗ 📜zoom_integration_android.iml
📂build
📂ios
📂lib
┃ ┗ 📜main.dart
📂linux
📂macos
📂test
📂web
📂windows
📜.metadata
📜analysis_options.yaml
📜pubspec.lock
📜pubspec.yaml
📜README.md
📜zoom_integration.iml


Подробнее здесь: https://stackoverflow.com/questions/782 ... my-flutter
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «Android»