输出aar 到新项目,运行成功
This commit is contained in:
+8
-10
@@ -9,12 +9,11 @@ apply from: "./download_vvl.gradle"
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
namespace 'com.hmwl.sample'
|
namespace 'com.hmwl.sample'
|
||||||
compileSdk 35
|
compileSdk 36
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
// applicationId "com.hmwl.sample"
|
// applicationId "com.hmwl.sample"
|
||||||
minSdk 30
|
minSdk 30
|
||||||
targetSdk 35
|
targetSdk 36
|
||||||
versionCode 1
|
versionCode 1
|
||||||
versionName "1.0"
|
versionName "1.0"
|
||||||
|
|
||||||
@@ -57,17 +56,16 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 添加解压的 AAR 资源
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main {
|
main {
|
||||||
jniLibs.srcDirs += [
|
jniLibs.srcDirs += [
|
||||||
'libs/tasks-vision/jni',
|
'libs/tasks-vision/jni',
|
||||||
'libs/tasks-core/jni'
|
'libs/tasks-core/jni'
|
||||||
]
|
]
|
||||||
java.srcDirs += [
|
// java.srcDirs += [
|
||||||
'libs/tasks-vision/classes',
|
// 'libs/tasks-vision/vision_classes',
|
||||||
'libs/tasks-core/classes'
|
// 'libs/tasks-core/core_classes'
|
||||||
]
|
// ]
|
||||||
res.srcDirs += [
|
res.srcDirs += [
|
||||||
'libs/tasks-vision/res',
|
'libs/tasks-vision/res',
|
||||||
'libs/tasks-core/res'
|
'libs/tasks-core/res'
|
||||||
@@ -95,8 +93,8 @@ dependencies {
|
|||||||
// implementation files('libs/tasks-vision-0.10.26.aar')
|
// implementation files('libs/tasks-vision-0.10.26.aar')
|
||||||
// implementation files('libs/tasks-core-0.10.26.aar')
|
// implementation files('libs/tasks-core-0.10.26.aar')
|
||||||
|
|
||||||
implementation fileTree(dir: 'libs/tasks-vision', include: ['*.jar'])
|
implementation 'com.google.protobuf:protobuf-javalite:3.21.12'
|
||||||
implementation fileTree(dir: 'libs/tasks-core', include: ['*.jar'])
|
implementation files('libs/tasks-vision.jar', 'libs/tasks-core.jar')
|
||||||
|
|
||||||
|
|
||||||
def camerax_version = '1.4.2'
|
def camerax_version = '1.4.2'
|
||||||
|
|||||||
@@ -14,8 +14,8 @@
|
|||||||
<!-- 声明 MainActivity -->
|
<!-- 声明 MainActivity -->
|
||||||
<!-- 作为库,exported 通常设为 false,除非明确需要外部应用启动 -->
|
<!-- 作为库,exported 通常设为 false,除非明确需要外部应用启动 -->
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".FaceActivity"
|
||||||
android:exported="false"
|
android:exported="true"
|
||||||
tools:ignore="MissingClass"> <!-- 如果IDE报类找不到,可以添加这个 -->
|
tools:ignore="MissingClass"> <!-- 如果IDE报类找不到,可以添加这个 -->
|
||||||
|
|
||||||
<!-- 重要:移除 MAIN/LAUNCHER intent-filter -->
|
<!-- 重要:移除 MAIN/LAUNCHER intent-filter -->
|
||||||
|
|||||||
@@ -308,4 +308,8 @@ public class FaceActivity extends GameActivity implements FaceLandmarkerHelper.L
|
|||||||
}
|
}
|
||||||
|
|
||||||
public native void passDataToNative(ByteBuffer buffer, int pointCount, int width, int height);
|
public native void passDataToNative(ByteBuffer buffer, int pointCount, int width, int height);
|
||||||
|
|
||||||
|
protected void ChangeState(String json){
|
||||||
|
Log.i("FaceActivity", "ChangeState:" + json);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
|
||||||
<!-- Base application theme. -->
|
|
||||||
<style name="Theme.Sample" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
|
||||||
<!-- Primary brand color. -->
|
|
||||||
<item name="colorPrimary">@color/purple_200</item>
|
|
||||||
<item name="colorPrimaryVariant">@color/purple_700</item>
|
|
||||||
<item name="colorOnPrimary">@color/black</item>
|
|
||||||
<!-- Secondary brand color. -->
|
|
||||||
<item name="colorSecondary">@color/teal_200</item>
|
|
||||||
<item name="colorSecondaryVariant">@color/teal_200</item>
|
|
||||||
<item name="colorOnSecondary">@color/black</item>
|
|
||||||
<!-- Status bar color. -->
|
|
||||||
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
|
|
||||||
<!-- Customize your theme here. -->
|
|
||||||
</style>
|
|
||||||
</resources>
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
|
||||||
<!-- Base application theme. -->
|
|
||||||
<style name="Theme.Sample" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
|
||||||
<!-- Primary brand color. -->
|
|
||||||
<item name="colorPrimary">@color/purple_500</item>
|
|
||||||
<item name="colorPrimaryVariant">@color/purple_700</item>
|
|
||||||
<item name="colorOnPrimary">@color/white</item>
|
|
||||||
<!-- Secondary brand color. -->
|
|
||||||
<item name="colorSecondary">@color/teal_200</item>
|
|
||||||
<item name="colorSecondaryVariant">@color/teal_700</item>
|
|
||||||
<item name="colorOnSecondary">@color/black</item>
|
|
||||||
<!-- Status bar color. -->
|
|
||||||
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
|
|
||||||
<!-- Customize your theme here. -->
|
|
||||||
</style>
|
|
||||||
</resources>
|
|
||||||
@@ -5,7 +5,7 @@ junitVersion = "1.3.0"
|
|||||||
espressoCore = "3.7.0"
|
espressoCore = "3.7.0"
|
||||||
appcompat = "1.7.1"
|
appcompat = "1.7.1"
|
||||||
material = "1.13.0"
|
material = "1.13.0"
|
||||||
gamesActivity = "4.0.0"
|
gamesActivity = "2.0.2"
|
||||||
|
|
||||||
[libraries]
|
[libraries]
|
||||||
junit = { group = "junit", name = "junit", version.ref = "junit" }
|
junit = { group = "junit", name = "junit", version.ref = "junit" }
|
||||||
|
|||||||
Reference in New Issue
Block a user