Krosxx / Android-Auto-Api

安卓无障碍服务Api, 为了简化无障碍服务使用,并使用 Kotlin 以提供简洁的Api。
Apache License 2.0
417 stars 72 forks source link

测试demo报错了 #46

Open CodingNowPls opened 2 months ago

CodingNowPls commented 2 months ago

报错信息:

com.android.tools.r8.internal.sd: Method name '' in class 'cn.vove7.andro_accessibility_api.api.View_finder_apiKt$sam$cn_vove7_auto_core_viewfinder_MatchCondition$0' cannot be represented in dex format.

demo是从项目的app中复制出来,原封不动 以下是build.gradle apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'org.jetbrains.kotlin.android'

android { signingConfigs { debug { storeFile file('KEY') storePassword '1234567890' keyAlias 'key' keyPassword '1234567890' } } compileSdk 33

defaultConfig {
    applicationId "cn.vove7.andro_accessibility_api.demo"
    minSdkVersion 21
    targetSdkVersion 33
    versionCode 1
    versionName "1.0"

    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}
buildTypes {
    debug {
        signingConfig signingConfigs.debug
    }
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        signingConfig signingConfigs.debug
    }
}
buildFeatures {
    viewBinding true
}

}

dependencies { implementation fileTree(dir: "libs", include: ["*.jar"]) implementation 'androidx.core:core-ktx:1.10.0' implementation 'androidx.appcompat:appcompat:1.6.1' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation 'com.jakewharton.timber:timber:5.0.1'

implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4'

implementation 'me.panavtec:drawableview:0.6.0'

testImplementation 'junit:junit:4.13.2'
implementation 'com.github.Krosxx:Android-Auto-Api:4.0.0'

}

CodingNowPls commented 2 months ago

这是demo下载地址:链接: https://pan.baidu.com/s/1vZYusvcgnTNSMofAp4Ga7w?pwd=xvn9 提取码: xvn9

zongzj commented 2 months ago

+1

Krosxx commented 2 months ago

尝试切换gradle build jdk 版本

miaozilong commented 2 months ago

开始学习你的demo

miaozilong commented 2 months ago

image

miaozilong commented 2 months ago

image sha啥玩意 到处报错