kotlin-graphics / assimp

JVM Open Asset Import Library (Assimp)
Other
95 stars 28 forks source link

it's can open in android studio? #13

Open Nullifier1571 opened 6 years ago

Nullifier1571 commented 6 years ago

hi,i open it in android sutdio,it occured this error --->Failed to open zip file.Gradle's dependency cache may be corrupt

Nullifier1571 commented 6 years ago

https://github.com/Nullifier1571/kollin-assimp.git this is my project

Wasabi375 commented 6 years ago

I currently don't have android studio installed. I can not reproduce your error with intellij idea, but this might be because I don't have the android sdk installed. Before I go and set up an entire android development environment I have a question. Do you plan on modifying assimp or why did you add it to your build as it's own gradle module? If you just want to use it you should import it using gradle.

repositories{
    maven { url 'https://jitpack.io' }
}

dependencies {
    implementation "com.github.kotlin-graphics:assimp:$assimpVersion"
} 

AFAIK there is a problem with the latest releases but this commit(64e30d6c73) should work.

I probably should create a new release but I am new to the project so I have not yet had the time to do it :wink:

elect86 commented 6 years ago

I'll be back from holidays tomorrow, I'll take a look at it later this week if you didnt solve yet

Il giorno lun 3 set 2018 alle ore 02:49 Burkhard Mittelbach < notifications@github.com> ha scritto:

I currently don't have android studio installed. I can not reproduce your error with intellij idea, but this might be because I don't have the android sdk installed. Before I go and set up an entire android development environment I have a question. Do you plan on modifying assimp or why did you add it to your build as it's own gradle module? If you just want to use it you should import it using gradle.

repositories{ maven { url 'https://jitpack.io' } } dependencies { implementation "com.github.kotlin-graphics:assimp:$assimpVersion" }

AFAIK there is a problem with the latest releases but this commit(64e30d6 https://github.com/kotlin-graphics/assimp/commit/64e30d6c737bde04eb75a270971e713470bc64f7) should work.

I probably should create a new release but I am new to the project so I have not yet had the time to do it 😉

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kotlin-graphics/assimp/issues/13#issuecomment-417973022, or mute the thread https://github.com/notifications/unsubscribe-auth/AEyb0uUeGYhW9iaZvh1i-6IthKiiHqCtks5uXHyvgaJpZM4WPImj .

LoobyH commented 6 years ago

Hello, I don't know what values are in the assimpVersion list, can you tell me the latest values?

Wasabi375 commented 6 years ago

The last releases is 'v4.0-beta.11' but as I said I think there is a version problem with it. Right now I would use 64e30d6c73 as the version. Also if you want to see all existing versions you can use you can click on the "jitpack" image in the readme. This will lead you to a website explaining which version there are and how to import them.

LoobyH commented 6 years ago

I tried this version of v4.0-beta.11, which is problematic

ERROR: Failed to resolve: org.lwjgl:lwjgl:3.1.7-SNAPSHOT

Wasabi375 commented 6 years ago

As I said twice now, there is a problem with the last few releases, you should use 64e30d6c73 instead as the version. https://jitpack.io/#kotlin-graphics/assimp/64e30d6c73

LoobyH commented 6 years ago

This 64e30d6c73 version still has problems, I got some error information

org.gradle.execution.MultipleBuildFailures: Build completed with 1 failures. at org.gradle.initialization.DefaultGradleLauncher$ExecuteTasks.run(DefaultGradleLauncher.java:350) at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:300) at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:292) at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:174) at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90) at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31) at org.gradle.initialization.DefaultGradleLauncher.runTasks(DefaultGradleLauncher.java:216) at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:146) at org.gradle.initialization.DefaultGradleLauncher.executeTasks(DefaultGradleLauncher.java:121) at org.gradle.internal.invocation.GradleBuildController$1.call(GradleBuildController.java:77) at org.gradle.internal.invocation.GradleBuildController$1.call(GradleBuildController.java:74) at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:152) at org.gradle.internal.work.StopShieldingWorkerLeaseService.withLocks(StopShieldingWorkerLeaseService.java:38) at org.gradle.internal.invocation.GradleBuildController.doBuild(GradleBuildController.java:96) at org.gradle.internal.invocation.GradleBuildController.run(GradleBuildController.java:74) at org.gradle.tooling.internal.provider.runner.BuildModelActionRunner.run(BuildModelActionRunner.java:55) at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35) at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35) at org.gradle.tooling.internal.provider.ValidatingBuildActionRunner.run(ValidatingBuildActionRunner.java:32) at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$3.run(RunAsBuildOperationBuildActionRunner.java:47) at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:300) at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:292) at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:174) at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90) at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31) at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner.run(RunAsBuildOperationBuildActionRunner.java:43) at org.gradle.tooling.internal.provider.SubscribableBuildActionRunner.run(SubscribableBuildActionRunner.java:51) at org.gradle.launcher.exec.InProcessBuildActionExecuter$1.transform(InProcessBuildActionExecuter.java:50) at org.gradle.launcher.exec.InProcessBuildActionExecuter$1.transform(InProcessBuildActionExecuter.java:46) at org.gradle.composite.internal.DefaultRootBuildState.run(DefaultRootBuildState.java:74) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:46) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:32) at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:39) at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:25) at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:80) at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:53) at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:62) at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:34) at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:36) at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:25) at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:43) at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:29) at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:59) at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:31) at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:59) at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:44) at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:46) at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:30) at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:67) at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122) at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122) at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122) at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122) at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74) at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72) at org.gradle.util.Swapper.swap(Swapper.java:38) at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122) at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122) at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:62) at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122) at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:82) at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36) at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:122) at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50) at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:295) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63) at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.IllegalStateException: Transformation hasn't been executed yet at org.gradle.api.internal.artifacts.transform.TransformInfo.getFailure(TransformInfo.java:97) at org.gradle.api.internal.artifacts.transform.TransformInfo.access$000(TransformInfo.java:46) at org.gradle.api.internal.artifacts.transform.TransformInfo$ChainedTransformInfo.execute(TransformInfo.java:189) at org.gradle.api.internal.artifacts.transform.TransformInfoExecutor.execute(TransformInfoExecutor.java:34) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareWorkItemExecutor.execute(DefaultTaskExecutionGraph.java:273) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareWorkItemExecutor.execute(DefaultTaskExecutionGraph.java:258) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:135) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:130) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.execute(DefaultTaskPlanExecutor.java:200) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.executeWithWork(DefaultTaskPlanExecutor.java:191) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.run(DefaultTaskPlanExecutor.java:130) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:74) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph.execute(DefaultTaskExecutionGraph.java:139) at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:39) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:40) at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:24) at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:46) at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:49) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:40) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:33) at org.gradle.initialization.DefaultGradleLauncher$ExecuteTasks.run(DefaultGradleLauncher.java:347) ... 77 more

Nullifier1571 commented 6 years ago

@LoobyH yes i also get this error

LoobyH commented 6 years ago

I mention above problem is not the error of this project I know where the problem is, related to our operating environment

FAILURE: Build failed with an exception.

line:5 --> google()

Hope these information are helpful to you

elect86 commented 6 years ago

@Nullifier1571 I cloned your project, I synced and everything was fine on my side. Tested on Ubuntu

LoobyH commented 6 years ago

@elect86 I am using is Ubuntu, there will be a problem only in the Android development environment, other environment is ok

elect86 commented 6 years ago

So basically we are not those to blame, arent we? :p

Consider closing if this doesnt come from assimp itself ;)

LoobyH commented 6 years ago

I should have found the place that there is a problem errors

LoobyH commented 6 years ago

Oh my god! I this solves the above import dependence problem。 compile But to a new problem. compiler Caused by: com.android.builder.dexing.DexArchiveBuilderException: Failed to process /home/msmk06/AndroidStudioProjects/open/TestKotlin/app/build/intermediates/transforms/instantRun/debug/0 at com.android.build.gradle.internal.transforms.DexArchiveBuilderTransform.launchProcessing(DexArchiveBuilderTransform.java:906) at com.android.build.gradle.internal.transforms.DexArchiveBuilderTransform.lambda$convertToDexArchive$6(DexArchiveBuilderTransform.java:831) at java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1424) at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) Caused by: com.android.builder.dexing.DexArchiveBuilderException: Error while dexing. at com.android.builder.dexing.D8DexArchiveBuilder.getExceptionToRethrow(D8DexArchiveBuilder.java:124) at com.android.builder.dexing.D8DexArchiveBuilder.convert(D8DexArchiveBuilder.java:101) at com.android.build.gradle.internal.transforms.DexArchiveBuilderTransform.launchProcessing(DexArchiveBuilderTransform.java:901) ... 6 more Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete at com.android.tools.r8.utils.ExceptionUtils.withCompilationHandler(ExceptionUtils.java:70) at com.android.tools.r8.utils.ExceptionUtils.withD8CompilationHandler(ExceptionUtils.java:43) at com.android.tools.r8.D8.run(D8.java:94) at com.android.builder.dexing.D8DexArchiveBuilder.convert(D8DexArchiveBuilder.java:99) ... 7 more Caused by: com.android.tools.r8.utils.AbortException: Error: Cannot compute meet of types: FLOAT and INT at com.android.tools.r8.utils.Reporter.failIfPendingErrors(Reporter.java:116) at com.android.tools.r8.utils.Reporter.fatalError(Reporter.java:74) at com.android.tools.r8.utils.ExceptionUtils.withCompilationHandler(ExceptionUtils.java:64) ... 10 more

Through the cause of the above see if you can guide me to solve the problem. Thank you very much for you see the problem.

Wasabi375 commented 6 years ago

I don't think this will work at all. The problem as I understand it, is that you are trying to use this on android. Assimp however (at least for now) still depends on lwjgl which includes native bindings. Those are C++ code compiled for Windows, Mac or Linux directly. There is no way of using those on android, at least not as far as I know. In order to use Assimp on android you would need to change the entire library and it's dependencies. I'm not sure how much effort that would take. I'll look into it though.

LoobyH commented 6 years ago

Yes, I want to use depends on the project in android, thank you very much for your guidance

LoobyH commented 6 years ago

I typed the LWJGL package again according to lwjgl-android and re-relied, and the result was still the previous problem lwjgl

e3

Is there any good suggestion for me to try to revise?

elect86 commented 6 years ago

It looks like it's a bug

LoobyH commented 6 years ago

@elect86 Yeah,that's the bug.I can use your project on android.Thank you very much.

LoobyH commented 6 years ago

Can a file path under assert be passed as a parameter to the readFile method?

elect86 commented 6 years ago

What do you mean exactly?

Can you write a short example?

LoobyH commented 6 years ago

i tried String path = "file:///android_asset/OBJ/box.obj"; AiScene scene = new Importer().readFile(path); or String rawPath = "android.resource://" + getApplicationContext().getPackageName() + "/" + R.raw.box; AiScene scene = new Importer().readFile(rawPath);

both of which had errors

elect86 commented 6 years ago

what errors do you get?

LoobyH commented 6 years ago

get these errors 1、 Caused by: java.io.IOException: File doesn't exist: file:///android_asset/OBJ/box.obj 2、Caused by: java.io.IOException: File doesn't exist: android.resource://.......