weex环境配置的些许坑

2020-04-13  本文已影响0人  Fantast_d2be

weex 调试android开发环境

运行

weex run android

A problem occurred configuring project ':app'.
groovy.lang.GroovyRuntimeException: Cannot set the value of read-only property 'outputFile' for ApkVariantOutputImpl_Decorated{apkData=Main{type=MAIN, fullName=debug, filters=[], versionCode=1, versionName=1.0.0}} of type com.android.build.gradle.internal.api.ApkVariantOutputImpl.

//        variant.outputs.all {
//            outputFileName = "${variant.name}-${variant.versionName}.apk"
//        }
        variant.outputs.each { output ->
            def outputFile = output.outputFile
            if (outputFile != null && outputFile.name.equals('app-debug.apk')) {
                def fileName = outputFile.name.replace("app-debug.apk", "weex-app.apk")
                output.outputFile = new File(outputFile.parent, fileName)
            }
        }

Execution failed for task ':app:javaPreCompileDebug'.
Annotation processors must be explicitly declared now. The following dependencies on the compile classpath are found to contain annotation processor. Please add them to the annotationProcessor configuration.
- weexplugin-processor-1.3.jar (com.taobao.android:weexplugin-processor:1.3)
Alternatively, set android.defaultConfig.javaCompileOptions.annotationProcessorOptions.includeCompileClasspath = true to continue with previous behavior. Note that this option is deprecated and will be removed in the future.
See https://developer.android.com/r/tools/annotation-processor-error-message.html for more details.

javaCompileOptions {
            annotationProcessorOptions {
                includeCompileClasspath true
            }
        }

完整的defaultConfig

defaultConfig {
        applicationId "com.weex.app"
        minSdkVersion project.appMinSdkVersion
        targetSdkVersion project.targetSdkVersion
        versionCode 1
        versionName "1.0.0"
        ndk {
            abiFilters "x86"
            abiFilters "armeabi"
        }
        javaCompileOptions {
            annotationProcessorOptions {
                includeCompileClasspath true
            }
        }
    }
上一篇 下一篇

猜你喜欢

热点阅读