没有为模型配置python解释器

时间:2019-05-20 11:20:28

标签: android android-studio

我正在尝试在我的应用程序中运行一些python代码。 (在android studio中)。但是,我不断收到此错误:“没有为模型配置python解释器”,因此,我什至无法运行像print("hello")这样的最简单的代码。

一些细节:
在我的主程序包中,我打开了一个新的python程序包,因此我自动拥有init.py文件,并尝试在其中运行:print(“ hello”),还尝试在同一目录中打开另一个python文件,并将代码放在此处但它不会运行。     提供了gurdle.build-s。

p.s:我在互联网上搜索了此问题,但没有人谈论android studio,每个人都在谈论选择另一个SDK。但是我的“项目结构”中没有python SDK,当我尝试搜索一个要下载的文件时,在“ SDK管理器”中找不到任何文件。

详细信息:

___________________________________________________
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"
    }
}

0 个答案:

没有答案