Не удается запустить приложение Vue-demo NativeScript / nativescript-facebook - PullRequest
0 голосов
/ 17 октября 2019

Я сделал именно так, как сказано в Здесь : После запуска npm run build.plugin я получаю:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':javaPreCompileRelease'.
> Could not resolve all files for configuration ':releaseCompileClasspath'.
   > Could not find support-core-utils.jar (com.android.support:support-core-utils:28.0.0).
     Searched in the following locations:
         https://maven.google.com/com/android/support/support-core-utils/28.0.0/support-core-utils-28.0.0.jar

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 0s
Failed to build plugin nativescript-facebook : 
Error: Command ./gradlew failed with exit code 1
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! nativescript-facebook@4.2.0 build: `npm i && tsc && tns plugin build && npm run ngc`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the nativescript-facebook@4.2.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/yuka/.npm/_logs/2019-10-17T05_10_09_621Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ build.plugin: `cd ../src && npm run build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @ build.plugin script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/yuka/.npm/_logs/2019-10-17T05_10_09_646Z-debug.log

Вот файл nativescript-facebook/demo-vue/platforms/android/build.gradle:

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

buildscript {

    def initialize = { ->
        def userDir = "${rootProject.projectDir}/../.."
        apply from: "$rootDir/user_properties_reader.gradle"
        apply from: "$rootDir/paths.gradle"
        rootProject.ext.userDefinedGradleProperties = getUserProperties("${getAppResourcesPath(userDir)}/Android")
    }
    initialize()

    def computeKotlinVersion = { -> project.hasProperty("kotlinVersion") ? kotlinVersion : "1.3.41"
    }
    def kotlinVersion = computeKotlinVersion()

    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
    beforeEvaluate { project ->
        if (rootProject.hasProperty("userDefinedGradleProperties")) {
            rootProject.ext.userDefinedGradleProperties.each { entry ->
                def propertyName = entry.getKey()
                def propertyValue = entry.getValue()
                project.ext.set(propertyName, propertyValue)
            }
        }

    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

Вот nativescript-facebook / demo-vue / platform / android / app / build.gradle

Я нахожусь за брандмауэром, однако я туннелирую всю свою сеть кНапример, ec2 amazon использует sshuttle , и я могу без проблем создавать множество других проектов и плагинов nativescript.

...