неразрешенная ссылка: IO и неразрешенная ссылка: ошибка FlutterActivity, когда пытайтесь развевать построение APK.
Пробое решение: я открываю папку Android на Android Stustio и некоторую загрузку зависимости.e: file:///C:/flutterprojects/apkteerkhelo99/android/app/src/main/kotlin/com/example/teerkhelo99/MainActivity.kt:5:8 Unresolved reference: io
e: file:///C:/flutterprojects/apkteerkhelo99/android/app/src/main/kotlin/com/example/teerkhelo99/MainActivity.kt:7:22 Unresolved reference: FlutterActivity
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileReleaseKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
> Compilation error. See log for more details
android \build.gradle
buildscript {
ext.kotlin_version = '1.9.20'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.6.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.15'
}
}
allprojects {
repositories {
google()
mavenCentral()
maven {
url 'https://storage.googleapis.com/download.flutter.io'
}
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
android/app/build.gradle
plugins {
id "com.android.application"
id "org.jetbrains.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 flutterVersionCode = localProperties.getProperty('flutter.versionCode', '1').toInteger()
def flutterVersionName = localProperties.getProperty('flutter.versionName', '1.0')
android {
namespace "com.example.teerkhelo99"
compileSdkVersion 34
ndkVersion "25.1.8937393"
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.example.teerkhelo99"
minSdkVersion 21
targetSdkVersion 34
versionCode flutterVersionCode
versionName flutterVersionName
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
externalNativeBuild {
cmake {
version "3.22.1"
}
}
}
flutter {
source '../..'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation platform("com.google.firebase:firebase-bom:32.7.0")
implementation "com.google.firebase:firebase-analytics"
implementation "com.google.firebase:firebase-auth"
implementation "androidx.multidex:multidex:2.0.1"
implementation "androidx.core:core-ktx:1.9.0"
implementation "androidx.appcompat:appcompat:1.6.1"
implementation "com.google.android.material:material:1.11.0"
}
android/app/src/main/kotlin/com/example/teerkhelo99/mainactivity.kt
package com.example.teerkhelo99
import io.flutter.embedding.android.FlutterActivity
class MainActivity : FlutterActivity() {
}
local.properties
flutter.sdk=C:\\src\\flutter
sdk.dir=C:\\Android\\Sdk
flutter.buildMode=release
flutter.versionName=1.0.0
flutter.versionCode=1
android.buildToolsVersion=35.0.1
settings.gradle
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 'com.android.application' version '8.6.0' apply false
id 'org.jetbrains.kotlin.android' version '1.9.22' apply false
id 'com.google.gms.google-services' version '4.4.0' apply false
id 'dev.flutter.flutter-gradle-plugin' apply false
}
include ":app"
Подробнее здесь: https://stackoverflow.com/questions/795 ... eractivity
Неразрешенная ссылка: io, неразрешенная ссылка: Flutteractivity ⇐ Android
Форум для тех, кто программирует под Android
-
Anonymous
1744168287
Anonymous
[b] неразрешенная ссылка: IO и неразрешенная ссылка: ошибка FlutterActivity, когда пытайтесь развевать построение APK. [/b]
[b] Пробое решение: я открываю папку Android на Android Stustio и некоторую загрузку зависимости.e: file:///C:/flutterprojects/apkteerkhelo99/android/app/src/main/kotlin/com/example/teerkhelo99/MainActivity.kt:5:8 Unresolved reference: io
e: file:///C:/flutterprojects/apkteerkhelo99/android/app/src/main/kotlin/com/example/teerkhelo99/MainActivity.kt:7:22 Unresolved reference: FlutterActivity
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileReleaseKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
> Compilation error. See log for more details
android \build.gradle[/b]
buildscript {
ext.kotlin_version = '1.9.20'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.6.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.15'
}
}
allprojects {
repositories {
google()
mavenCentral()
maven {
url 'https://storage.googleapis.com/download.flutter.io'
}
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
[b] android/app/build.gradle[/b]
plugins {
id "com.android.application"
id "org.jetbrains.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 flutterVersionCode = localProperties.getProperty('flutter.versionCode', '1').toInteger()
def flutterVersionName = localProperties.getProperty('flutter.versionName', '1.0')
android {
namespace "com.example.teerkhelo99"
compileSdkVersion 34
ndkVersion "25.1.8937393"
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.example.teerkhelo99"
minSdkVersion 21
targetSdkVersion 34
versionCode flutterVersionCode
versionName flutterVersionName
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
externalNativeBuild {
cmake {
version "3.22.1"
}
}
}
flutter {
source '../..'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation platform("com.google.firebase:firebase-bom:32.7.0")
implementation "com.google.firebase:firebase-analytics"
implementation "com.google.firebase:firebase-auth"
implementation "androidx.multidex:multidex:2.0.1"
implementation "androidx.core:core-ktx:1.9.0"
implementation "androidx.appcompat:appcompat:1.6.1"
implementation "com.google.android.material:material:1.11.0"
}
[b] android/app/src/main/kotlin/com/example/teerkhelo99/mainactivity.kt[/b]
package com.example.teerkhelo99
import io.flutter.embedding.android.FlutterActivity
class MainActivity : FlutterActivity() {
}
[b] local.properties[/b]
flutter.sdk=C:\\src\\flutter
sdk.dir=C:\\Android\\Sdk
flutter.buildMode=release
flutter.versionName=1.0.0
flutter.versionCode=1
android.buildToolsVersion=35.0.1
[b] settings.gradle[/b]
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 'com.android.application' version '8.6.0' apply false
id 'org.jetbrains.kotlin.android' version '1.9.22' apply false
id 'com.google.gms.google-services' version '4.4.0' apply false
id 'dev.flutter.flutter-gradle-plugin' apply false
}
include ":app"
Подробнее здесь: [url]https://stackoverflow.com/questions/79563385/unresolved-reference-io-unresolved-reference-flutteractivity[/url]
Ответить
1 сообщение
• Страница 1 из 1
Перейти
- Кемерово-IT
- ↳ Javascript
- ↳ C#
- ↳ JAVA
- ↳ Elasticsearch aggregation
- ↳ Python
- ↳ Php
- ↳ Android
- ↳ Html
- ↳ Jquery
- ↳ C++
- ↳ IOS
- ↳ CSS
- ↳ Excel
- ↳ Linux
- ↳ Apache
- ↳ MySql
- Детский мир
- Для души
- ↳ Музыкальные инструменты даром
- ↳ Печатная продукция даром
- Внешняя красота и здоровье
- ↳ Одежда и обувь для взрослых даром
- ↳ Товары для здоровья
- ↳ Физкультура и спорт
- Техника - даром!
- ↳ Автомобилистам
- ↳ Компьютерная техника
- ↳ Плиты: газовые и электрические
- ↳ Холодильники
- ↳ Стиральные машины
- ↳ Телевизоры
- ↳ Телефоны, смартфоны, плашеты
- ↳ Швейные машинки
- ↳ Прочая электроника и техника
- ↳ Фототехника
- Ремонт и интерьер
- ↳ Стройматериалы, инструмент
- ↳ Мебель и предметы интерьера даром
- ↳ Cантехника
- Другие темы
- ↳ Разное даром
- ↳ Давай меняться!
- ↳ Отдам\возьму за копеечку
- ↳ Работа и подработка в Кемерове
- ↳ Давай с тобой поговорим...
Мобильная версия