Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example pose estimation: dependencies updated + compatibility with newest android studio #495

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lite/examples/pose_estimation/android/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ for a comparison between these models.
### Prerequisites

* If you don't have it already, install **[Android Studio](
https://developer.android.com/studio/index.html)** 4.2 or
above, following the instructions on the website.
https://developer.android.com/studio/index.html)** Jellyfish | 2023.3.1 or
above, following the instructions on the website.

* Android device and Android development environment with minimum API 21.

Expand Down
27 changes: 14 additions & 13 deletions lite/examples/pose_estimation/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ plugins {
}

android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
compileSdk 35
namespace 'org.tensorflow.lite.examples.poseestimation'


defaultConfig {
applicationId "org.tensorflow.lite.examples.poseestimation"
minSdkVersion 23
targetSdkVersion 30
targetSdkVersion 35
versionCode 1
versionName "1.0"

Expand Down Expand Up @@ -38,17 +39,17 @@ apply from:"download.gradle"
dependencies {

implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.5.0'
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation "androidx.activity:activity-ktx:1.2.3"
implementation 'androidx.fragment:fragment-ktx:1.3.5'
implementation 'org.tensorflow:tensorflow-lite:2.5.0'
implementation 'androidx.core:core-ktx:1.13.1'
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'com.google.android.material:material:1.12.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation "androidx.activity:activity-ktx:1.9.0"
implementation 'androidx.fragment:fragment-ktx:1.8.1'
implementation 'org.tensorflow:tensorflow-lite:2.7.0'
implementation 'org.tensorflow:tensorflow-lite-gpu:2.5.0'
implementation 'org.tensorflow:tensorflow-lite-support:0.3.0'

androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
androidTestImplementation "com.google.truth:truth:1.1.3"
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
androidTestImplementation "com.google.truth:truth:1.1.5"
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
android:roundIcon="@drawable/ic_launcher"
android:supportsRtl="true"
android:theme="@style/Theme.PoseEstimation">
<activity android:name=".MainActivity">
<activity android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
Expand Down
8 changes: 6 additions & 2 deletions lite/examples/pose_estimation/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = "1.4.32"
ext {
agp_version = '8.5.0'
kotlin_version = '2.0.0'
}

repositories {
google()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:4.2.0"
classpath "com.android.tools.build:gradle:$agp_version"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

// NOTE: Do not place your application dependencies here; they belong
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#Thu Jun 27 13:52:01 CEST 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down