Код: Выделить всё
[frame_perf] perfboost open tb_ctl file failed, isApp[1], errno=No such file or directory
FATAL EXCEPTION: main Process: com.my.app.stg, PID: 18292
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.my.app.stg/com.biosphere.terrai.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.my.app.MainActivity" on path: DexPathList[[zip file "/data/app/~~4WIGO53JC8kZEYhSkFIcLA==/com.my.app.stg-MBmo_L3L_l4N55Phv57l2A==/base.apk"],nativeLibraryDirectories=[/data/app/~~4WIGO53JC8kZEYhSkFIcLA==/com.my.app.stg-MBmo_L3L_l4N55Phv57l2A==/lib/arm64, /data/app/~~4WIGO53JC8kZEYhSkFIcLA==/com.my.app.stg-MBmo_L3L_l4N55Phv57l2A==/base.apk!/lib/arm64-v8a, /system/lib64, /system/system_ext/lib64]]
Теперь я вообще не могу собрать приложение и получаю новую относительную ошибку. в пространство имен Android
Код: Выделить всё
* What went wrong:
Failed to query the value of property 'buildFlowServiceProperty'.
> Could not isolate value org.jetbrains.kotlin.gradle.plugin.statistics.BuildFlowService$Parameters_Decorated@be57342 of type BuildFlowService.Parameters
> A problem occurred configuring project ':appcenter_sdk_flutter'.
> Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl.
> Namespace not specified. Specify a namespace in the module's build file
Код: Выделить всё
plugins {
id "com.android.application"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
id "com.google.gms.google-services"
}
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterDefaults = [
versionCode: '1',
versionName: '1.0',
minSdkVersion: '24'
]
def flutterVersionCode = localProperties.getProperty('flutter.versionCode', flutterDefaults.versionCode).toInteger()
def flutterVersionName = localProperties.getProperty('flutter.versionName', flutterDefaults.versionName)
def flutterMinSdkVersion = localProperties.getProperty('flutter.minSdkVersion', flutterDefaults.minSdkVersion).toInteger()
android {
namespace "com.my.app"
compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
applicationId "com.my.app"
minSdkVersion flutterMinSdkVersion
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
signingConfig signingConfigs.debug
}
}
flavorDimensions "env"
productFlavors {
dev {
dimension "env"
applicationIdSuffix ".dev"
versionNameSuffix "-dev"
resValue "string", "app_name", "[DEV] myApp"
}
staging {
dimension "env"
applicationIdSuffix ".stg"
versionNameSuffix "-stg"
resValue "string", "app_name", "[STG] myApp"
}
prod {
dimension "env"
resValue "string", "app_name", "myApp"
}
}
gradle.taskGraph.whenReady { taskGraph ->
if (!project.hasProperty('android.injected.build.model')
&& taskGraph.allTasks.any { it.name.toLowerCase().equals("assembledebug") || it.name.toLowerCase().equals("assemblerelease") }) {
throw new Exception("Please specify a flavor with --flavor ")
}
}
}
flutter {
source '../..'
}
dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
Я читал, что обходной путь, включающий метод afterEvaluate, может сработать, поэтому я сделал это в android/build.gradle:
Код: Выделить всё
rootProject.buildDir = '../build'
subprojects {
afterEvaluate { project ->
if (project.hasProperty('android')) {
project.android {
if (namespace == null) {
namespace project.group
}
}
}
}
project.buildDir = "${rootProject.buildDir}/${project.name}"
evaluationDependsOn(':app')
}
allprojects {
repositories {
google()
mavenCentral()
}
}
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
Я также прочитайте о добавлении этого, чтобы решить проблему:
Код: Выделить всё
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
Есть идеи, как это сделать решить эту проблему и наконец создать свое приложение?
Спасибо!
Подробнее здесь: https://stackoverflow.com/questions/790 ... dle-plugin
Мобильная версия