Сбой на устройстве Android для Flutter Image_cropper java.lang.noclassdeffounderror: Неудачное разрешение: landroidx/appAndroid

Форум для тех, кто программирует под Android
Ответить
Anonymous
 Сбой на устройстве Android для Flutter Image_cropper java.lang.noclassdeffounderror: Неудачное разрешение: landroidx/app

Сообщение Anonymous »

Сбой на устройстве Android с этим сообщением об ошибке: < /p>
java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/appcompat/app/AppCompatActivity
Я обнаружил, что другие люди, имеющие проблемы с аварией с Android, но не с этой ошибкой, и их исправления не работали для меня.



















































< /code>
Я не совсем понимаю, почему у меня сейчас есть эта проблема, потому что все работало хорошо на Android, и я не знаю, что изменилось.Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.29.3, on macOS 15.3.2 24D81
darwin-x64, locale fr-FR)
[!] Android toolchain - develop for Android devices (Android SDK
version 34.0.0)
! Some Android licenses not accepted. To resolve this, run:
flutter doctor --android-licenses
[✓] Xcode - develop for iOS and macOS (Xcode 16.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.3)
[✓] Android Studio (version 2023.3)
[✓] VS Code (version 1.100.2)
[✓] Connected device (3 available)
! Error: Browsing on the local area network for iLaw. Ensure the
device is unlocked and attached with a cable or associated
with the same local area network as this Mac.
The device must be opted into Developer Mode to connect
wirelessly. (code -27)
[✓] Network resources

плюс мое приложение/build.gradle:
plugins {
id "com.android.application"
id "kotlin-android"
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
id "dev.flutter.flutter-gradle-plugin"
}
def enableProguardInReleaseBuilds = true
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}

android {
namespace = "com.pulsar.zeinamobilebusiness"
compileSdk = 35
ndkVersion = flutter.ndkVersion

compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8
}

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/bu ... on-id.html).
applicationId "com.pulsar.zeinamobilebusiness"
// You can update the following values to match your application needs.
// For more information, see: https://flutter.dev/to/review-gradle-config.
minSdk = 23
targetSdk = 35
versionCode = 63
}

signingConfigs {
release {
keyAlias = keystoreProperties['keyAlias']
keyPassword = keystoreProperties['keyPassword']
storeFile = keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword = keystoreProperties['storePassword']
}
}

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.release
minifyEnabled false
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'

}
}
}

dependencies {
implementation "androidx.core:core:1.12.0"
}

flutter{
source = "../.."
}

configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
if (details.requested.group == 'androidx.core' && details.requested.name == 'core') {
details.useVersion '1.12.0'
}
}
}


Подробнее здесь: https://stackoverflow.com/questions/796 ... founderror
Ответить

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

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

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

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

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