Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to import #11

Closed
AndroidDeveloperLB opened this issue Aug 18, 2018 · 15 comments
Closed

Failed to import #11

AndroidDeveloperLB opened this issue Aug 18, 2018 · 15 comments

Comments

@AndroidDeveloperLB
Copy link

AndroidDeveloperLB commented Aug 18, 2018

I had an error with "bintrayUsername", so I removed what's related to it , but then I got this error:

No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android

image

How can I import it well?

@zjupure
Copy link
Owner

zjupure commented Aug 18, 2018

Please check your ndk environment. Add local.properties file in the root directory of project and config ndk.dir/sdk.dir to the right path in your machine. Use google to solve the ndk compile issue, Thanks.

@AndroidDeveloperLB
Copy link
Author

AndroidDeveloperLB commented Aug 18, 2018

I have NDK installed.
The "local.properties" already exists, and it points to correct paths:

ndk.dir=C\:\\Users\\user\\AppData\\Local\\Android\\Sdk\\ndk-bundle
sdk.dir=C\:\\Users\\User\\AppData\\Local\\Android\\Sdk

See:

image

@zjupure
Copy link
Owner

zjupure commented Aug 19, 2018

cd ndk-bundle/toolchains directory and make sure mips64el-linux-android related directory is exist. I think your ndk might be broken or installed not fully. Please try to reinstall the ndk or download the ndk.zip from Android Developer website. Hope it will help you.

xxxx:ndk-bundle xxx$ cd toolchains
xxxx:toolchains xxx$ ls
aarch64-linux-android-4.9	mipsel-linux-android-4.9
arm-linux-androideabi-4.9	x86-4.9
llvm				x86_64-4.9
mips64el-linux-android-4.9

@AndroidDeveloperLB
Copy link
Author

AndroidDeveloperLB commented Aug 19, 2018

I tried to uninstall and re-install. Same result.
There is no "mips64el-linux-android" directory in the "toolchains" folder:

image

According to the next link, new versions of the NDK don't have MIPS anymore, as it got deprecated :

https://www.reddit.com/r/androiddev/comments/8idme0/missing_strip_tool_for_mips_abi_wtf/?st=jl0e4swe&sh=001f8ad3

Same here:

https://developer.android.com/ndk/guides/abis#sa

Note: Historically the NDK supported 32-bit and 64-bit MIPS, but support was removed in NDK r17.

Can you try to update your Android related components to the latest versions, and try to uninstall&re-install the NDK and tell me if it's true?

Also, isn't there a way for the repository project to just target all that's available automatically, instead of mentioning each of the architectures manually?

@zjupure
Copy link
Owner

zjupure commented Aug 19, 2018

Thanks for you feedback. The library jni not support MIPS platform, see Application.mk under webp_decoder/src/main/jni directory.

APP_BUILD_SCRIPT := Android.mk

APP_ABI := armeabi-v7a armeabi arm64-v8a x86 x86_64

I have tried to remove the mips64el-linux-android directory under ndk-bundle, then got the same error too. But the log seems like that the lastest ndk-r17 broken the android build gradle plugin.

Caused by: java.lang.RuntimeException: No toolchains found in the NDK toolchains folder for ABI with prefix: mipsel-linux-android
	at com.android.build.gradle.internal.ndk.DefaultNdkInfo.getDefaultToolchainVersion(DefaultNdkInfo.java:365)
	at com.android.build.gradle.internal.ndk.DefaultNdkInfo.getToolchainPath(DefaultNdkInfo.java:208)
	at com.android.build.gradle.internal.ndk.DefaultNdkInfo.getStripExecutable(DefaultNdkInfo.java:334)
	at com.android.build.gradle.internal.ndk.NdkHandler.getStripExecutable(NdkHandler.java:407)
	at com.android.build.gradle.internal.transforms.StripDebugSymbolTransform.<init>(StripDebugSymbolTransform.java:87)
	at com.android.build.gradle.internal.TaskManager.createStripNativeLibraryTask(TaskManager.java:1321)
	at com.android.build.gradle.internal.LibraryTaskManager.createTasksForVariantData(LibraryTaskManager.java:246)
	at com.android.build.gradle.internal.VariantManager.createTasksForVariantData(VariantManager.java:460)
	at com.android.build.gradle.internal.VariantManager.lambda$createAndroidTasks$1(VariantManager.java:282)
	at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:81)
	at com.android.build.gradle.internal.VariantManager.createAndroidTasks(VariantManager.java:278)
	at com.android.build.gradle.BasePlugin.lambda$createAndroidTasks$6(BasePlugin.java:601)
	at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:81)
	at com.android.build.gradle.BasePlugin.createAndroidTasks(BasePlugin.java:596)
	at com.android.build.gradle.BasePlugin.lambda$null$4(BasePlugin.java:526)
	at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:81)
	at com.android.build.gradle.BasePlugin.lambda$createTasks$5(BasePlugin.java:522)
	at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:91)
	at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:80)
	at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:42)
	at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:230)
	at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:149)
	at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:58)
	at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:324)
	at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:234)
	at org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:140)
	at org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:37)
	at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
	at com.sun.proxy.$Proxy30.afterEvaluate(Unknown Source)
	at org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate(LifecycleProjectEvaluator.java:76)
	... 85 more

I also try to upgrade com.android.tools.build:gradle:3.1.4 to the latest stable version 3.1.4. The error is still exist. So there is nothing to do with this project.

As a workaround, you can download a lower version ndk such as r16, then copy the missing tools mips64el-linux-android to your ndk-bundle/toolchains directory. I guess this will fix you ndk compiler issue.

Also you can try the alpha version of android gradle plugin 3.3.0-alpha06 to see if the problem is solved or not by google.

@AndroidDeveloperLB
Copy link
Author

Can you please report this to Google:

https://issuetracker.google.com/issues

I'm sure you can give them more details than me. I'm a newb with JNI/NDK...

I only wanted to try out your repository to see if I can play animated webp&GIF .

Suppose I use gradle dependency to use your library (using a new POC), will it work?

@AndroidDeveloperLB
Copy link
Author

BTW, I think you can use this instead:

APP_ABI := all

@zjupure
Copy link
Owner

zjupure commented Aug 20, 2018

@AndroidDeveloperLB I have fired an issue to google, see https://issuetracker.google.com/issues/112810603. If you still have problem with ndk compile, please track the issue and provide more information. Thanks.

@AndroidDeveloperLB
Copy link
Author

Well I actually got the same error with Google's own sample:
https://issuetracker.google.com/issues/112779429

@AndroidDeveloperLB
Copy link
Author

Say, do you know of a good workaround, without the need to download some old stuff?

@AndroidDeveloperLB
Copy link
Author

ok they said I should update to :

    classpath 'com.android.tools.build:gradle:3.3.0-alpha07'

I tried to change it, but then a lot of other things failed.
Please update the project to make it work on new versions of Gradle. Soon there will be an official new version of the IDE that will work with it officially...

@zjupure
Copy link
Owner

zjupure commented Aug 25, 2018

The library is designed and used for online product. I won't update android build gradle to an unstable version until official release is ready. If you really want to try new features and tools, please clone the project and try to fix it. PR are always welcome, thanks.

@AndroidDeveloperLB
Copy link
Author

AndroidDeveloperLB commented Aug 25, 2018

So it will work fine if I use this:

https://androidstudio.googleblog.com/2018/08/android-studio-32-rc-2-now-available.html

?
And once 3.3 is beta/final, will you consider updating the library? It just seems there is a lot to be done to make it be built... :(

@AndroidDeveloperLB
Copy link
Author

OK attached here a sample project of using this library.

AnimatedWebPTest.zip

@AndroidDeveloperLB
Copy link
Author

@AndroidDeveloperLB I have fired an issue to google, see https://issuetracker.google.com/issues/112810603. If you still have problem with ndk compile, please track the issue and provide more information. Thanks.

I can't reach this link.
I've tried today to clone the newest version of the repository (and use stable version of IDE), and got that it can't find the NDK. Wrote about it here:
https://issuetracker.google.com/issues/119913745

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants