我想在AndroidStudio中导入GPUImage.所以我从https://github.com/CyberAgent/android-gpuimage下载了GPUImage库,然后我引用了这个链接@L_301_2@
知道我想如何导入GPUImage库.但是AndroID studo给了我以下错误,它链接到下面发布的library / build.gradle.
错误信息:
Error:(2, 0) Plugin with ID 'com.novoda.bintray-release' not found
请告诉我如何更正此错误以及如何正确导入GPUImage库?
库/的build.gradle:
apply plugin: 'com.androID.library'apply plugin: 'com.novoda.bintray-release'androID {compileSdkVersion COMPILE_SDK_VERSION as intbuildToolsversion BUILD_TOolS_VERSIONdefaultConfig { minSdkVersion MIN_SDK_VERSION as int targetSdkVersion TARGET_SDK_VERSION as int versionCode "git rev-List origin/master --count".execute().text.toInteger() versionname VERSION_name consumerProguardfiles 'proguard-rules.txt' ndk { modulename "gpuimage-library" stl "gnustl_shared" abiFilters "all" ldlibs "log" }}sourceSets { main { manifest.srcfile 'AndroIDManifest.xml' java.srcDirs = ['src'] resources.srcDirs = ['src'] aIDl.srcDirs = ['src'] renderscript.srcDirs = ['src'] res.srcDirs = ['res'] assets.srcDirs = ['assets'] jni.srcDirs = ['jni'] } instrumentTest.setRoot('tests')}lintoptions { abortOnError false}}task androIDJavadocs(type: Javadoc) {source = androID.sourceSets.main.java.srcDirsclasspath += project.files(androID.getbootclasspath().join(file.pathSeparator))}task androIDJavadocsJar(type: Jar, dependsOn: androIDJavadocs) {classifIEr = 'javadoc'from androIDJavadocs.destinationDir}task androIDSourcesJar(type: Jar) {classifIEr = 'sources'from androID.sourceSets.main.java.srcDirs}artifacts {archives androIDSourcesJararchives androIDJavadocsJar}publish {userOrg = POM_DEVELOPER_IDgroupID = GROUPartifactID = ARTIFACT_IDpublishVersion = VERSION_namedesc = POM_DESCRIPTIONwebsite = POM_URL}W/System.err: at org.opencv.androID.OpenCVLoader.initDeBUG(OpenCVLoader.java:66)W/System.err: at org.opencv.androID.OpenCVLoader.initDeBUG(OpenCVLoader.java:66)W/ContextImpl: Implicit intents with startService are not safe: Intent { act=org.opencv.engine.BIND } androID.content.Contextwrapper.bindService:604 org.opencv.androID.AsyncServiceHelper.initopenCV:24 org.opencv.androID.OpenCVLoader.initAsync:89 E/OpenCVLoader/BaseLoaderCallback: OpenCV loading Failed!
解决方法:
我通过修改build.gradle文件解决了这个问题,如下所示
build.gradle“project:GPUImageTest00”:
// top-level build file where you can add configuration options common to all sub-projects/modules.buildscript {repositorIEs { jcenter()}dependencIEs { classpath 'com.androID.tools.build:gradle:2.2.2' classpath 'com.novoda:bintray-release:0.3.4' // NOTE: Do not place your application dependencIEs here; they belong // in the indivIDual module build.gradle files}}allprojects {repositorIEs { jcenter()}}task clean(type: Delete) {delete rootProject.buildDir}
build.gradle“module:app”:
apply plugin: 'com.androID.application'androID {compileSdkVersion 24buildToolsversion "24.0.3"defaultConfig { applicationID "com.example.gpuimagetest_00" minSdkVersion 18 targetSdkVersion 18 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(include: ['*.jar'], dir: 'libs')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:24.2.1'testCompile 'junit:junit:4.12'compile project(':library')}
build.gradle“module:library”:
apply plugin: 'com.androID.library'apply plugin: 'com.novoda.bintray-release'androID {compileSdkVersion 24buildToolsversion "24.0.3"defaultConfig { minSdkVersion 18 targetSdkVersion 18 versionCode 1 versionname "1.0" consumerProguardfiles 'proguard-rules.txt' ndk { modulename "gpuimage-library" stl "gnustl_shared" abiFilters "all" ldlibs "log" }}sourceSets { main { manifest.srcfile 'AndroIDManifest.xml' java.srcDirs = ['src'] resources.srcDirs = ['src'] aIDl.srcDirs = ['src'] renderscript.srcDirs = ['src'] res.srcDirs = ['res'] assets.srcDirs = ['assets'] jni.srcDirs = [] } instrumentTest.setRoot('tests')}lintoptions { abortOnError false}}task androIDJavadocs(type: Javadoc) {source = androID.sourceSets.main.java.srcDirsclasspath += project.files(androID.getbootclasspath().join(file.pathSeparator))}task androIDJavadocsJar(type: Jar, dependsOn: androIDJavadocs) {classifIEr = 'javadoc'from androIDJavadocs.destinationDir}task androIDSourcesJar(type: Jar) {classifIEr = 'sources'from androID.sourceSets.main.java.srcDirs}artifacts {archives androIDSourcesJararchives androIDJavadocsJar}publish {userOrg = 'novoda'groupID = 'com.novoda'artifactID = 'bintray-release'publishVersion = '0.3.4'desc = 'Oh hi, this is a nice description for a project, right?'website = 'https://github.com/novoda/bintray-release'}
build.gradle模块:示例:
apply plugin: 'com.androID.application'androID {compileSdkVersion 24buildToolsversion "24.0.3"defaultConfig { minSdkVersion 18 targetSdkVersion 18}sourceSets { main { manifest.srcfile 'AndroIDManifest.xml' java.srcDirs = ['src'] resources.srcDirs = ['src'] aIDl.srcDirs = ['src'] renderscript.srcDirs = ['src'] res.srcDirs = ['res'] assets.srcDirs = ['assets'] } instrumentTest.setRoot('tests')}lintoptions { abortOnError true}}repositorIEs {jcenter()maven { url "https://oss.sonatype.org/content/repositorIEs/snapshots/" }}dependencIEs {compile project(':library')// compile 'jp.co.cyberagent.androID.gpuimage:gpuimage-library:1.4.1'compile 'com.androID.support:appcompat-v7:24.2.1'}
总结 以上是内存溢出为你收集整理的android – 如何使用id“com.novoda.bintray-release”GPUImage添加插件全部内容,希望文章能够帮你解决android – 如何使用id“com.novoda.bintray-release”GPUImage添加插件所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)