android - 我尝试在我的安卓设备上运行 ionic 应用程序,但出现错误

标签 android android-studio ionic-framework

我得到的错误:

20:29   Gradle sync failed: Could not find org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.60-eap-25.
            Searched in the following locations:
            https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.3.60-eap-25/kotlin-stdlib-jdk8-1.3.60-eap-25.pom
            https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.3.60-eap-25/kotlin-stdlib-jdk8-1.3.60-eap-25.jar
            https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.3.60-eap-25/kotlin-stdlib-jdk8-1.3.60-eap-25.pom
            https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.3.60-eap-25/kotlin-stdlib-jdk8-1.3.60-eap-25.jar
            https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.3.60-eap-25/kotlin-stdlib-jdk8-1.3.60-eap-25.pom
            https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.3.60-eap-25/kotlin-stdlib-jdk8-1.3.60-eap-25.jar
            Required by:
            unspecified:unspecified:unspecified > com.android.tools.build:gradl... (show balloon)

20:29   NDK Resolution Outcome: Project settings: Gradle model version=4.6, NDK version is UNKNOWN

我安装NDK

local.properties 文件:

sdk.dir=C:\Users\陈弗里德曼\AppData\Local\Android\Sdk

ndk.dir=C:\Users\Chen Fridman\AppData\Local\Android\Sdk\ndk\20.1.5948944

build.gradle (project:android) 文件:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

    repositories {
      mavenCentral()
      google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.0'
        classpath 'com.google.gms:google-services:4.2.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}
task clean(type: Delete) {
    delete rootProject.buildDir
}

............................................

build.gradle (app) 文件:

 apply plugin: 'com.android.application'
android {
  compileSdkVersion 29
  buildToolsVersion "29.0.2"

  defaultConfig {
    applicationId "io.ionic.simhatzkenti"
    minSdkVersion 15
    targetSdkVersion 29
    versionCode 1
    versionName "1.0"

    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

  }
  buildTypes {
    release {
      minifyEnabled false
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
  }
}

dependencies {
  compile fileTree(dir: 'libs', include: ['*.jar'])
  androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
    exclude group: 'com.android.support', module: 'support-annotations'
  })
  compile 'com.android.support:appcompat-v7:29.+'
  compile 'com.android.support.constraint:constraint-layout:1.0.2'
  testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'


#Tue Jan 30 13:14:22 CST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip

我真的需要帮助,我卡住了! 非常感谢!

最佳答案

您是否按照 android 安装 ionic 应用程序的说明进行操作?通常您不需要 NDK。

https://ionicframework.com/docs

https://ionicframework.com/docs/building/android

关于android - 我尝试在我的安卓设备上运行 ionic 应用程序,但出现错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58755177/

相关文章:

css - IONIC Framework - 表单布局

android - 无法保持服务在 Android 中运行

android - 带有 HttpURLConnection 的 HTTP post 文件

android - 如何以编程方式关闭 SearchView?

android - Android Studio,Gradle和Card.IO

gradle - 我正在使用.pac配置。即使我选择了自动检测代理,Gradle也无法连接到互联网?

Android Studio KMM iOS 运行不会在 iPhone 模拟器中启动

javascript - 如何将状态更改解析为嵌套 View 上的 Controller

ViewModel中的Android Hilt Dagger 注入(inject)接口(interface)@ViewModelInject得到了UninitializedPropertyAccessException

android - 改变 ionic 项目的高度以适应屏幕而无需滚动