Compare commits
6 Commits
d5767156b9
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4e33063a98 | ||
|
|
1550783eef | ||
|
|
e23aaaa4ba | ||
|
|
06c7410e23 | ||
|
|
1cae048a7f | ||
|
|
ec1f7d2e72 |
@@ -1,12 +1,29 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id 'com.android.application'
|
id 'com.android.application'
|
||||||
id 'org.jetbrains.kotlin.android'
|
id 'org.jetbrains.kotlin.android'
|
||||||
|
id 'kotlin-kapt'
|
||||||
|
}
|
||||||
|
|
||||||
|
def oneSentenceAsrAar = file('libs/asr-one-sentence-release.aar')
|
||||||
|
|
||||||
|
kapt {
|
||||||
|
// Room uses javac stubs under kapt; keep parameter names for :bind variables.
|
||||||
|
javacOptions {
|
||||||
|
option("-parameters")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace 'com.digitalperson'
|
namespace 'com.digitalperson'
|
||||||
compileSdk 34
|
compileSdk 34
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
main {
|
||||||
|
// app/note/ref → assets 中为 ref/...(与 AppConfig.RefCorpus.ASSETS_ROOT 一致)
|
||||||
|
assets.srcDirs = ['src/main/assets', 'note']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
buildFeatures {
|
buildFeatures {
|
||||||
buildConfig true
|
buildConfig true
|
||||||
}
|
}
|
||||||
@@ -31,7 +48,7 @@ android {
|
|||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.digitalperson"
|
applicationId "com.digitalperson"
|
||||||
minSdk 21
|
minSdk 22
|
||||||
targetSdk 33
|
targetSdk 33
|
||||||
versionCode 1
|
versionCode 1
|
||||||
versionName "1.0"
|
versionName "1.0"
|
||||||
@@ -47,6 +64,9 @@ android {
|
|||||||
buildConfigField "String", "LLM_MODEL", "\"${(project.findProperty('LLM_MODEL') ?: 'doubao-1-5-pro-32k-character-250228').toString()}\""
|
buildConfigField "String", "LLM_MODEL", "\"${(project.findProperty('LLM_MODEL') ?: 'doubao-1-5-pro-32k-character-250228').toString()}\""
|
||||||
buildConfigField "boolean", "USE_LIVE2D", "${(project.findProperty('USE_LIVE2D') ?: 'true').toString()}"
|
buildConfigField "boolean", "USE_LIVE2D", "${(project.findProperty('USE_LIVE2D') ?: 'true').toString()}"
|
||||||
|
|
||||||
|
// 腾讯云「一句话识别」Android SDK:将 asr-one-sentence-release.aar 放入 app/libs/ 后为 true
|
||||||
|
buildConfigField "boolean", "HAS_TENCENT_ASR_SDK", "${oneSentenceAsrAar.exists()}"
|
||||||
|
|
||||||
ndk {
|
ndk {
|
||||||
abiFilters "arm64-v8a"
|
abiFilters "arm64-v8a"
|
||||||
}
|
}
|
||||||
@@ -91,4 +111,19 @@ dependencies {
|
|||||||
implementation files('libs/realtime_tts-release-v2.0.16-20260128-d80cafe.aar')
|
implementation files('libs/realtime_tts-release-v2.0.16-20260128-d80cafe.aar')
|
||||||
implementation 'com.google.code.gson:gson:2.8.9'
|
implementation 'com.google.code.gson:gson:2.8.9'
|
||||||
implementation 'com.squareup.okhttp3:okhttp:4.9.3'
|
implementation 'com.squareup.okhttp3:okhttp:4.9.3'
|
||||||
|
|
||||||
|
// Room dependencies
|
||||||
|
implementation 'androidx.room:room-runtime:2.5.2'
|
||||||
|
kapt 'androidx.room:room-compiler:2.5.2'
|
||||||
|
implementation 'androidx.room:room-ktx:2.5.2'
|
||||||
|
|
||||||
|
implementation project(':tuanjieLibrary')
|
||||||
|
implementation files('../tuanjieLibrary/libs/unity-classes.jar')
|
||||||
|
|
||||||
|
// BGE tokenizer (BasicTokenizer) + SimilarityManager 批量相似度测试
|
||||||
|
implementation 'com.google.guava:guava:31.1-android'
|
||||||
|
implementation 'org.ejml:ejml-core:0.43.1'
|
||||||
|
implementation 'org.ejml:ejml-simple:0.43.1'
|
||||||
|
|
||||||
|
// 腾讯云「一句话识别」通过 OkHttp 直接实现 TC3 签名,无需 AAR SDK
|
||||||
}
|
}
|
||||||
|
|||||||
4
app/libs/ASR_SDK_PLACE_AAR_HERE.txt
Normal file
4
app/libs/ASR_SDK_PLACE_AAR_HERE.txt
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
1. Open https://console.cloud.tencent.com/asr/download
|
||||||
|
2. Download the Android package for real-time speech recognition (实时语音识别).
|
||||||
|
3. Copy asr-realtime-release.aar into this folder (app/libs/).
|
||||||
|
4. Sync Gradle — BuildConfig.HAS_TENCENT_ASR_SDK will become true.
|
||||||
BIN
app/libs/_asr.zip
Normal file
BIN
app/libs/_asr.zip
Normal file
Binary file not shown.
13
app/libs/_asr_out/AndroidManifest.xml
Normal file
13
app/libs/_asr_out/AndroidManifest.xml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
package="com.tencent.iot.speech" >
|
||||||
|
|
||||||
|
<uses-sdk
|
||||||
|
android:minSdkVersion="16"
|
||||||
|
android:targetSdkVersion="33" />
|
||||||
|
|
||||||
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||||
|
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||||||
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
|
|
||||||
|
</manifest>
|
||||||
1
app/libs/_asr_out/R.txt
Normal file
1
app/libs/_asr_out/R.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
int string app_name 0x0
|
||||||
BIN
app/libs/_asr_out/classes.jar
Normal file
BIN
app/libs/_asr_out/classes.jar
Normal file
Binary file not shown.
BIN
app/libs/_asr_out/jni/arm64-v8a/libqcloud_asr_realtime.so
Normal file
BIN
app/libs/_asr_out/jni/arm64-v8a/libqcloud_asr_realtime.so
Normal file
Binary file not shown.
BIN
app/libs/_asr_out/jni/armeabi-v7a/libqcloud_asr_realtime.so
Normal file
BIN
app/libs/_asr_out/jni/armeabi-v7a/libqcloud_asr_realtime.so
Normal file
Binary file not shown.
BIN
app/libs/_asr_out/jni/x86/libqcloud_asr_realtime.so
Normal file
BIN
app/libs/_asr_out/jni/x86/libqcloud_asr_realtime.so
Normal file
Binary file not shown.
BIN
app/libs/_asr_out/jni/x86_64/libqcloud_asr_realtime.so
Normal file
BIN
app/libs/_asr_out/jni/x86_64/libqcloud_asr_realtime.so
Normal file
Binary file not shown.
9
app/libs/_asr_out/proguard.txt
Normal file
9
app/libs/_asr_out/proguard.txt
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# SDK
|
||||||
|
-keepclasseswithmembernames class com.tencent.aai.** { # 保持 native 方法不被混淆
|
||||||
|
native <methods>;
|
||||||
|
}
|
||||||
|
|
||||||
|
-keep public class com.tencent.aai.** {*;}
|
||||||
|
-keep interface com.tencent.aai.audio.data.PcmAudioDataSource {
|
||||||
|
void start(); throws com.tencent.aai.exception.ClientException;
|
||||||
|
}
|
||||||
4
app/libs/_asr_out/res/values/values.xml
Normal file
4
app/libs/_asr_out/res/values/values.xml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<string name="app_name">aai</string>
|
||||||
|
</resources>
|
||||||
11
app/libs/_osr_out/AndroidManifest.xml
Normal file
11
app/libs/_osr_out/AndroidManifest.xml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
package="com.tencent.cloud.qcloudasrsdk.onesentence" >
|
||||||
|
|
||||||
|
<uses-sdk
|
||||||
|
android:minSdkVersion="16"
|
||||||
|
android:targetSdkVersion="33" />
|
||||||
|
|
||||||
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
|
|
||||||
|
</manifest>
|
||||||
1577
app/libs/_osr_out/R.txt
Normal file
1577
app/libs/_osr_out/R.txt
Normal file
File diff suppressed because it is too large
Load Diff
BIN
app/libs/_osr_out/asr-one-sentence.zip
Normal file
BIN
app/libs/_osr_out/asr-one-sentence.zip
Normal file
Binary file not shown.
BIN
app/libs/_osr_out/classes.jar
Normal file
BIN
app/libs/_osr_out/classes.jar
Normal file
Binary file not shown.
90
app/libs/_osr_out/proguard.txt
Normal file
90
app/libs/_osr_out/proguard.txt
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
-optimizationpasses 5 # 指定代码的压缩级别
|
||||||
|
-allowaccessmodification #优化时允许访问并修改有修饰符的类和类的成员
|
||||||
|
-dontusemixedcaseclassnames # 是否使用大小写混合
|
||||||
|
-dontskipnonpubliclibraryclasses # 是否混淆第三方jar
|
||||||
|
-dontpreverify # 混淆时是否做预校验
|
||||||
|
-verbose # 混淆时是否记录日志
|
||||||
|
-ignorewarnings # 忽略警告,避免打包时某些警告出现
|
||||||
|
-optimizations !code/simplification/arithmetic,!code/simplification/cast,!field/*,!class/merging/* # 混淆时所采用的算法
|
||||||
|
|
||||||
|
-keepattributes *Annotation*
|
||||||
|
-keepclasseswithmembernames class * { # 保持 native 方法不被混淆
|
||||||
|
native <methods>;
|
||||||
|
}
|
||||||
|
|
||||||
|
-keepclassmembers public class * extends android.view.View {
|
||||||
|
void set*(***);
|
||||||
|
*** get*();
|
||||||
|
}
|
||||||
|
|
||||||
|
-keepclassmembers class * extends android.app.Activity {
|
||||||
|
public void *(android.view.View);
|
||||||
|
}
|
||||||
|
|
||||||
|
-keepclassmembers enum * { # 保持枚举 enum 类不被混淆
|
||||||
|
public static **[] values();
|
||||||
|
public static ** valueOf(java.lang.String);
|
||||||
|
}
|
||||||
|
|
||||||
|
-keep class * implements android.os.Parcelable { # 保持 Parcelable 不被混淆
|
||||||
|
public static final android.os.Parcelable$Creator *;
|
||||||
|
}
|
||||||
|
|
||||||
|
-keepclassmembers class **.R$* { #不混淆R文件
|
||||||
|
public static <fields>;
|
||||||
|
}
|
||||||
|
|
||||||
|
-dontwarn android.support.**
|
||||||
|
##--- End android默认 ---
|
||||||
|
|
||||||
|
##--- For:不能被混淆的 ---
|
||||||
|
-keep public class * extends android.app.Activity
|
||||||
|
-keep public class * extends android.app.Fragment
|
||||||
|
-keep public class * extends android.app.Application
|
||||||
|
-keep public class * extends android.app.Service
|
||||||
|
-keep public class * extends android.content.BroadcastReceiver
|
||||||
|
-keep public class * extends android.content.ContentProvider
|
||||||
|
-keep public class * extends android.app.backup.BackupAgentHelper
|
||||||
|
-keep public class * extends android.preference.Preference
|
||||||
|
|
||||||
|
##--- For:保持自定义控件类不被混淆 ---
|
||||||
|
-keepclasseswithmembers class * {
|
||||||
|
public <init>(android.content.Context, android.util.AttributeSet);
|
||||||
|
}
|
||||||
|
-keepclasseswithmembers class * {
|
||||||
|
public <init>(android.content.Context, android.util.AttributeSet, int);
|
||||||
|
}
|
||||||
|
##--- For:android-support-v4 ---
|
||||||
|
-dontwarn android.support.v4.**
|
||||||
|
-keep class android.support.v4.** { *; }
|
||||||
|
-keep interface android.support.v4.app.** { *; }
|
||||||
|
-keep class * extends android.support.v4.** { *; }
|
||||||
|
-keep public class * extends android.support.v4.**
|
||||||
|
-keep class * extends android.support.v4.app.** {*;}
|
||||||
|
-keep class * extends android.support.v4.view.** {*;}
|
||||||
|
|
||||||
|
##--- For:Serializable ---
|
||||||
|
-keep class * implements java.io.Serializable {*;}
|
||||||
|
-keepnames class * implements java.io.Serializable
|
||||||
|
-keepclassmembers class * implements java.io.Serializable {*;}
|
||||||
|
|
||||||
|
##--- For:Gson ---
|
||||||
|
-keepattributes *Annotation*
|
||||||
|
-keep class com.google.gson.stream.** { *; }
|
||||||
|
|
||||||
|
|
||||||
|
##--- For:Remove log ---
|
||||||
|
-assumenosideeffects class android.util.Log {
|
||||||
|
public static boolean isLoggable(java.lang.String, int);
|
||||||
|
public static int v(...);
|
||||||
|
public static int i(...);
|
||||||
|
public static int w(...);
|
||||||
|
public static int d(...);
|
||||||
|
public static int e(...);
|
||||||
|
}
|
||||||
|
|
||||||
|
##--- For:attributes(未启用) ---
|
||||||
|
#-keepattributes SourceFile,LineNumberTable # 保持反编译工具能看到代码的行数,以及release包安装后出现异常信息可以知道在哪行代码出现异常,建议不启用
|
||||||
|
-keepattributes *Annotation* #使用注解
|
||||||
|
-keepattributes Signature #过滤泛型 出现类型转换错误时,启用这个
|
||||||
|
#-keepattributes *Exceptions*,EnclosingMethod #没试过,未知效果
|
||||||
BIN
app/libs/_tts.zip
Normal file
BIN
app/libs/_tts.zip
Normal file
Binary file not shown.
11
app/libs/_tts_out/AndroidManifest.xml
Normal file
11
app/libs/_tts_out/AndroidManifest.xml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
package="com.tencent.cloud.realtime.tts" >
|
||||||
|
|
||||||
|
<uses-sdk
|
||||||
|
android:minSdkVersion="16"
|
||||||
|
android:targetSdkVersion="33" />
|
||||||
|
|
||||||
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
|
|
||||||
|
</manifest>
|
||||||
0
app/libs/_tts_out/R.txt
Normal file
0
app/libs/_tts_out/R.txt
Normal file
BIN
app/libs/_tts_out/classes.jar
Normal file
BIN
app/libs/_tts_out/classes.jar
Normal file
Binary file not shown.
0
app/libs/_tts_out/proguard.txt
Normal file
0
app/libs/_tts_out/proguard.txt
Normal file
BIN
app/libs/asr-one-sentence-release.aar
Normal file
BIN
app/libs/asr-one-sentence-release.aar
Normal file
Binary file not shown.
BIN
app/libs/asr-realtime-release.aar
Normal file
BIN
app/libs/asr-realtime-release.aar
Normal file
Binary file not shown.
BIN
app/libs/classes.jar
Normal file
BIN
app/libs/classes.jar
Normal file
Binary file not shown.
@@ -140,13 +140,13 @@ https://tianchi.aliyun.com/dataset/93864
|
|||||||
动作 :
|
动作 :
|
||||||
- 认识用户: haru_g_m22 (高兴动作)
|
- 认识用户: haru_g_m22 (高兴动作)
|
||||||
- 不认识: haru_g_m01(中性动作)
|
- 不认识: haru_g_m01(中性动作)
|
||||||
AI问候(根据是否认识个性化)
|
AI问候(根据是否认识,节日,时间等因素个性化)
|
||||||
启动20秒计时器
|
启动20秒计时器
|
||||||
↓
|
↓
|
||||||
[等待回复状态]
|
[等待回复状态]
|
||||||
动作 : haru_g_m17
|
动作 : haru_g_m17
|
||||||
↓
|
↓
|
||||||
├─ 如果用户在20秒内回复 → 进入[对话状态]
|
├─ 如果用户按下了麦克风按钮 → 进入[对话状态]
|
||||||
│ 动作 :根据对话情绪动态调整
|
│ 动作 :根据对话情绪动态调整
|
||||||
│ - 开心: haru_g_m22 / haru_g_m21 / haru_g_m18 / haru_g_m09 / haru_g_m08
|
│ - 开心: haru_g_m22 / haru_g_m21 / haru_g_m18 / haru_g_m09 / haru_g_m08
|
||||||
│ - 悲伤: haru_g_m25 / haru_g_m24 / haru_g_m05 / haru_g_m16
|
│ - 悲伤: haru_g_m25 / haru_g_m24 / haru_g_m05 / haru_g_m16
|
||||||
@@ -195,3 +195,112 @@ https://tianchi.aliyun.com/dataset/93864
|
|||||||
[告别状态] (用户离开后)
|
[告别状态] (用户离开后)
|
||||||
动作 : 简短告别,用语音,→ 等待3秒 → 回到[空闲状态]
|
动作 : 简短告别,用语音,→ 等待3秒 → 回到[空闲状态]
|
||||||
|
|
||||||
|
11. ## 用户类型区分
|
||||||
|
1. guest 用户 :
|
||||||
|
|
||||||
|
- 默认用户ID,当没有检测到人脸时使用
|
||||||
|
- 在 Live2DChatActivity.kt 中初始化为 private var activeUserId: String = "guest"
|
||||||
|
- 表示未通过人脸识别的临时用户
|
||||||
|
2. face_ 用户 :
|
||||||
|
|
||||||
|
- 通过人脸识别生成的用户ID,格式为 face_<数字>
|
||||||
|
- 在 FaceDetectionPipeline.kt 中生成: lastFaceIdentityId = match.matchedId?.let { "face_$it" }
|
||||||
|
- 表示通过人脸识别的正式用户
|
||||||
|
## 转换逻辑
|
||||||
|
当系统检测到人脸时,会触发以下流程:
|
||||||
|
|
||||||
|
1. 人脸检测 : FaceDetectionPipeline 检测到人脸
|
||||||
|
2. 身份识别 : FaceRecognizer 尝试识别用户身份
|
||||||
|
3. ID生成 :如果是新用户,生成新的 face_<数字> ID
|
||||||
|
4. 回调更新 :通过 onPresenceChanged 回调将 faceIdentityId 传递给 Live2DChatActivity
|
||||||
|
5. ID切换 : Live2DChatActivity 中的 interactionController.onFacePresenceChanged 会调用 handler.onRememberUser(faceIdentityId, recognized)
|
||||||
|
6. 更新活跃用户 : onRememberUser 方法会将 activeUserId 更新为 faceIdentityId
|
||||||
|
因此,当检测到人脸时, guest 用户会自动切换为 face_ 用户。
|
||||||
|
|
||||||
|
face_profiles 和 user_memory 表之间的关联是通过 ID转换 实现的,没有专门的关联表:
|
||||||
|
|
||||||
|
## 关联机制
|
||||||
|
1. ID转换规则 :
|
||||||
|
- face_profiles 表中的 id 字段(数字)→ 转换为 face_<id> 格式
|
||||||
|
- 例如: id=1 → face_1
|
||||||
|
- 这个转换在 FaceDetectionPipeline.kt 中实现: lastFaceIdentityId = match.matchedId?.let { "face_$it" }
|
||||||
|
2. 关联流程 :
|
||||||
|
- 系统检测到人脸后,从 face_profiles 表中查找匹配的记录,获取 id
|
||||||
|
- 将 id 转换为 face_<id> 格式的用户ID
|
||||||
|
- 这个用户ID被用作 user_memory 表中的 userId 字段
|
||||||
|
- 通过这个 userId ,两个表就建立了关联
|
||||||
|
|
||||||
|
12. 使用 adb shell 直接操作sqlite数据库
|
||||||
|
1. 进入设备 shell
|
||||||
|
adb shell
|
||||||
|
2. 找到应用数据库
|
||||||
|
# 进入应用数据目录
|
||||||
|
run-as com.digitalperson
|
||||||
|
|
||||||
|
# 进入数据库目录
|
||||||
|
cd databases
|
||||||
|
|
||||||
|
# 查看数据库文件
|
||||||
|
ls -la
|
||||||
|
3. 使用 sqlite3 命令查看数据库
|
||||||
|
bash
|
||||||
|
# 打开数据库
|
||||||
|
sqlite3 your_database.db # digital_human.db face_feature.db
|
||||||
|
|
||||||
|
# 在 sqlite3 提示符下执行命令:
|
||||||
|
.tables # 查看所有表
|
||||||
|
.schema table_name # 查看表结构
|
||||||
|
SELECT * FROM table_name; # 查询数据
|
||||||
|
.headers on # 显示列名
|
||||||
|
.mode column # 列模式显示
|
||||||
|
.quit # 退出
|
||||||
|
|
||||||
|
13. Unity 集成时遇到的问题:
|
||||||
|
1. 问题描述:NDK的版本不对,导致编译错误
|
||||||
|
解决方法:
|
||||||
|
- 在 build.gradle 中指定 NDK 版本
|
||||||
|
ndkVersion "23.1.7779620"
|
||||||
|
2. 问题描述:Unity 编译时提示 NDK 路径错误
|
||||||
|
解决方法:
|
||||||
|
- 在 build.gradle 中指定 NDK 路径
|
||||||
|
ndkPath "D:/software/2022.3.62t5/Editor/Data/PlaybackEngines/AndroidPlayer/NDK"
|
||||||
|
|
||||||
|
3. 问题描述:Build file 'D:\code\digital_person\tuanjieLibrary\build.gradle'
|
||||||
|
Could not get unknown property 'tuanjieStreamingAssets' for object of type com.android.build.gradle.internal.dsl.LibraryAndroidResourcesImpl$AgpDecorated.
|
||||||
|
解决方法:
|
||||||
|
- 在项目的顶层的 gradle.properties 中添加 tuanjieStreamingAssets 配置
|
||||||
|
tuanjieStreamingAssets=.unity3d, google-services-desktop.json, google-services.json, GoogleService-Info.plist
|
||||||
|
|
||||||
|
4. 问题描述:重新从 Tuanjie 导出 tuanjieLibrary 后报错:
|
||||||
|
Build was configured to prefer settings repositories over project repositories but repository 'maven' was added by build file 'tuanjieLibrary\build.gradle'
|
||||||
|
原因:tuanjieLibrary/build.gradle 里的 repositories {} 块与根目录 settings.gradle 中的
|
||||||
|
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) 冲突。
|
||||||
|
解决方法:
|
||||||
|
- 直接删除 tuanjieLibrary/build.gradle 中的整个 repositories {} 块。
|
||||||
|
- 所需的 Aliyun 镜像已在 settings.gradle 的 dependencyResolutionManagement.repositories 中统一声明,无需重复。
|
||||||
|
|
||||||
|
5. 问题描述:Build file 'D:\code\digital_person\tuanjieLibrary\build.gradle' line: 6
|
||||||
|
|
||||||
|
Error resolving plugin [id: 'com.android.application', version: '7.4.2', apply: false]
|
||||||
|
> The request for this plugin could not be satisfied because the plugin is already on the classpath with a different version (8.2.2).
|
||||||
|
|
||||||
|
解决方法:
|
||||||
|
直接修改项目的 build.gradle 文件,将插件版本改为一致的 8.2.2
|
||||||
|
|
||||||
|
6. 问题描述:Build file 'D:\code\digital_person\tuanjieLibrary\build.gradle' line: 16
|
||||||
|
|
||||||
|
A problem occurred evaluating project ':tuanjieLibrary'.
|
||||||
|
> Build was configured to prefer settings repositories over project repositories but repository 'maven' was added by build file 'tuanjieLibrary\build.gradle'
|
||||||
|
|
||||||
|
解决方法(见问题4):删除 tuanjieLibrary/build.gradle 中的 repositories {} 块。
|
||||||
|
|
||||||
|
7. 问题描述:重新从 Tuanjie 导出后,:tuanjieLibrary 模块无法被 :app 解析:
|
||||||
|
Could not resolve project :tuanjieLibrary.
|
||||||
|
> No matching configuration of project :tuanjieLibrary was found. None of the consumable configurations have attributes.
|
||||||
|
原因:Tuanjie 重新导出后,tuanjieLibrary/build.gradle 被还原为只含 apply false 的"根项目"构建文件,
|
||||||
|
没有 apply plugin: 'com.android.library',Gradle 无法识别该模块为 Android 库。
|
||||||
|
解决方法:
|
||||||
|
- 将 tuanjieLibrary/build.gradle 替换为完整的 Android library 模块构建文件(apply plugin: 'com.android.library'),
|
||||||
|
参考 launcher/build.gradle 的配置(compileSdkVersion、ndkVersion、ndkPath、aaptOptions、buildTypes 等),
|
||||||
|
并在 dependencies 中添加 implementation files('libs/unity-classes.jar')。
|
||||||
|
- 注意:每次从 Tuanjie 重新导出后都需要重新替换该文件。
|
||||||
BIN
app/note/ref/__MACOSX/._一年级上-生活语文v3
Normal file
BIN
app/note/ref/__MACOSX/._一年级上-生活语文v3
Normal file
Binary file not shown.
BIN
app/note/ref/__MACOSX/._一年级上-生活适应
Normal file
BIN
app/note/ref/__MACOSX/._一年级上-生活适应
Normal file
Binary file not shown.
BIN
app/note/ref/__MACOSX/一年级上-生活语文v3/._.DS_Store
Normal file
BIN
app/note/ref/__MACOSX/一年级上-生活语文v3/._.DS_Store
Normal file
Binary file not shown.
BIN
app/note/ref/__MACOSX/一年级上-生活语文v3/._一年级上-生活语文-个人生活
Normal file
BIN
app/note/ref/__MACOSX/一年级上-生活语文v3/._一年级上-生活语文-个人生活
Normal file
Binary file not shown.
BIN
app/note/ref/__MACOSX/一年级上-生活语文v3/._一年级上-生活语文-学校生活
Normal file
BIN
app/note/ref/__MACOSX/一年级上-生活语文v3/._一年级上-生活语文-学校生活
Normal file
Binary file not shown.
BIN
app/note/ref/__MACOSX/一年级上-生活语文v3/._一年级上-生活语文-家庭生活
Normal file
BIN
app/note/ref/__MACOSX/一年级上-生活语文v3/._一年级上-生活语文-家庭生活
Normal file
Binary file not shown.
BIN
app/note/ref/__MACOSX/一年级上-生活语文v3/._一年级上-生活语文-自然与社会
Normal file
BIN
app/note/ref/__MACOSX/一年级上-生活语文v3/._一年级上-生活语文-自然与社会
Normal file
Binary file not shown.
BIN
app/note/ref/__MACOSX/一年级上-生活语文v3/一年级上-生活语文-个人生活/._.DS_Store
Normal file
BIN
app/note/ref/__MACOSX/一年级上-生活语文v3/一年级上-生活语文-个人生活/._.DS_Store
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user