2

I'm trying to run some python code in my app. (in android studio). But, I keep getting this error: "No python interpreter configured for the model" and thus I can't run even the simplest code like: print("hello").

Some details:
In my main package I opened a new python package, so I automatically have init.py file and I tried to run there: print("hello"), and also tried to open another python file in the same directory and put my code there but it won't run. gurdle.build-s are provided.

p.s: I searched the internet for this problem, but no one talks about android studio, and everyone talks about choosing another SDK. However I don't have python SDK in my 'project structure', and when I tried to search one for download, I couldn't find any in 'SDK manager'.

details:

___________________________________________________
apply plugin: 'com.android.application'
apply plugin: "com.chaquo.python"

android {
    compileSdkVersion 26
    defaultConfig {
        applicationId "com.example.eyal.doctorsapp"
        minSdkVersion 19
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        ndk {
            abiFilters "x86", "armeabi-v7a"
        }
        python {
            version "2.7.10"
        }
    }   
___________________________________________________________________
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

    repositories {
        google()
        jcenter()
        maven{url "https://chaquo.com/maven"}
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.4.1'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
        classpath "com.chaquo.python:gradle:0.5.0"
    }
}
mhsmith
  • 6,675
  • 3
  • 41
  • 58
  • possible duplicate of [How to configure python interpretor in Android Studio](https://stackoverflow.com/questions/54667573/how-to-configure-python-interpretor-in-android-studio) – coroutineDispatcher May 20 '19 at 15:06
  • Does this answer your question? [How to configure Python interpretor in android studio](https://stackoverflow.com/questions/54667573/how-to-configure-python-interpretor-in-android-studio) – mhsmith Apr 07 '20 at 09:28

0 Answers0