Git Product home page Git Product logo

Comments (17)

singwhatiwanna avatar singwhatiwanna commented on May 22, 2024

插件的构建请参考:Demo 工程运行须知

from virtualapk.

singwhatiwanna avatar singwhatiwanna commented on May 22, 2024

@VincentLoveAndroid 主要是由于Gradle以及buildTools的版本所导致的问题,请按照建议版本来。

from virtualapk.

VincentLoveAndroid avatar VincentLoveAndroid commented on May 22, 2024

@singwhatiwanna 你好,按照demo配置了gradle 以及 buildTools版本,插件执行:
 gradle clean assemblePlugin
编译的时候仍旧报错:
Caused by: java.lang.ClassCastException: org.gradle.api.internal.tasks.DefaultTaskInputs$TaskInputUnionFileCollection cannot be cast to org.gradle.api.internal.file.collections.DefaultConfigurableFileCollection
或:

  • Exception is:
    org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:processReleaseResources'.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
    at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:66)
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
    at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)
    at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:25)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:110)
    at org.gradle.execution.SelectedTaskExecutionAction.execute(S

from virtualapk.

VincentLoveAndroid avatar VincentLoveAndroid commented on May 22, 2024

@singwhatiwanna
Caused by: java.lang.NullPointerException: Cannot invoke method getAt() on null object
at com.didi.virtualapk.aapt.ArscEditor.slice(ArscEditor.groovy:61)
at com.didi.virtualapk.aapt.ArscEditor$slice.call(Unknown Source)
at com.didi.virtualapk.aapt.Aapt.filterPackage(Aapt.groovy:51)
at com.didi.virtualapk.aapt.Aapt$filterPackage$0.call(Unknown Source)
at com.didi.virtualapk.merge.ResourceMerger$_merge_closure2.doCall(ResourceMerger.groovy:73)
at org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(AbstractTask.java:590)
at org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(AbstractTask.java:571)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
... 68 more

from virtualapk.

TheBloodElf avatar TheBloodElf commented on May 22, 2024

我也遇到你这个错误,改了tool版本之后出现了下面的错误:

  • What went wrong:
    Execution failed for task ':app:processReleaseResources'.

Cannot invoke method getAt() on null object

from virtualapk.

qq634421026 avatar qq634421026 commented on May 22, 2024

和你一样遇到这样的错误

  • What went wrong:
    Execution failed for task ':app:processReleaseResources'.

Cannot invoke method getAt() on null object

from virtualapk.

VincentLoveAndroid avatar VincentLoveAndroid commented on May 22, 2024

@qq634421026 @TheBloodElf @singwhatiwanna 对于Cannot invoke method getAt() on null object 这个问题最终发现要在插件app build.gradle加上:compile 'com.didi.virtualapk:core:0.9.0'依赖 文档没写😓,org.gradle.api.internal.tasks.DefaultTaskInputs$TaskInputUnionFileCollection cannot be cast to org.gradle.api.internal.file.collections.DefaultConfigurableFileCollection 这个问题则应该是本地gradle版本和使用的不一致造成

from virtualapk.

qq634421026 avatar qq634421026 commented on May 22, 2024

增加 compile 'com.didi.virtualapk:core:0.9.0'之后执行./gradlew clean assemblePlugin还是报Cannot invoke method getAt() on null object错

from virtualapk.

TheBloodElf avatar TheBloodElf commented on May 22, 2024

@singwhatiwanna 希望尽快解决这个问题,因为很想接入此库

from virtualapk.

houliang avatar houliang commented on May 22, 2024

出现
What went wrong:
Execution failed for task ':app:processReleaseResources'.
这个问题,module的依赖加上
compile 'com.android.support:appcompat-v7:找个版本'
依赖库以后没问题了

from virtualapk.

haojunmin avatar haojunmin commented on May 22, 2024

我的qq1149598411,我也遇到Execution failed for task ':app:processReleaseResources'.
Cannot invoke method getAt() on null object这个问题了,谁知道该怎么办?

from virtualapk.

crzhare avatar crzhare commented on May 22, 2024

好像还没人来解决这个问题啊。

from virtualapk.

crzhare avatar crzhare commented on May 22, 2024

估计滴滴自己写的那个gradle插件版本的问题。只能希望他们开发人员将版本升上去了。

from virtualapk.

crzhare avatar crzhare commented on May 22, 2024

Caused by: java.lang.NoClassDefFoundError: com/android/builder/dependency/ManifestDependency
at com.didi.virtualapk.VAPlugin$_apply_closure1$_closure16.doCall(VAPlugin.groovy:72)
at com.didi.virtualapk.VAPlugin$_apply_closure1.doCall(VAPlugin.groovy:52)
at org.gradle.listener.ClosureBackedMethodInvocationDispatch.dispatch(ClosureBackedMethodInvocationDispatch.java:40)
at org.gradle.listener.ClosureBackedMethodInvocationDispatch.dispatch(ClosureBackedMethodInvocationDispatch.java:25)
at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:44)
... 61 more

from virtualapk.

crzhare avatar crzhare commented on May 22, 2024

@singwhatiwanna Gradle以及buildTools 版本你们有升级计划吗?真心希望你们能升级上去。现在开发的一般都是用的新版本

from virtualapk.

singwhatiwanna avatar singwhatiwanna commented on May 22, 2024

@slksir 正在支持中,这个工作比较复杂,需要一些时间。

from virtualapk.

zhulg avatar zhulg commented on May 22, 2024

不降到2.14.1是不行的,降后解决。

from virtualapk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.