GeezerVison is showing github.com — Class name which contain special character like '$' not added · Issue #2699 · googleapis/google-cloud-java
Class name which contain special character like '$' not added #2699
Description
I am not using your project.. I am using google cloud translate jar file in my project. I know this is not the place to ack question not related to this project but i need help.
when i add jar file in my lib folder in android studio the .class files which contain '$' sign in there name not added. And due to this when i run my project it gives error that this file is missing. The error is.
java.lang.NoClassDefFoundError: com.google.cloud.translate.TranslateOptions$TranslateDefaults
at com.google.cloud.translate.TranslateOptions.(TranslateOptions.java:147)
at com.google.cloud.translate.TranslateOptions.(TranslateOptions.java:39)
at com.google.cloud.translate.TranslateOptions$Builder.build(TranslateOptions.java:142)
at edu.nic.dell.naseemchatbot.ChatActivity.translateTextWithOptionsAndModel(ChatActivity.java:938)
at edu.nic.dell.naseemchatbot.ChatActivity$5.onClick(ChatActivity.java:272)
at android.view.View.performClick(View.java:4766)
at android.view.View$PerformClick.run(View.java:19683)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5538)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:960)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
Please help me out here. Thank you
Activity
andreamlin commented on Dec 13, 2017
Which version of google-cloud-translate are you using? Can you post your dependency tree, or pom.xml, or .gradle file?
pongad commented on Jan 22, 2018
I'll close this for inactivity. That said, I believe the classes are in the JAR as of the latest release. I downloaded the JAR from Maven and
zipinfo ~/Downloads/google-cloud-translate-1.15.0.jar | grep TranslateOp
-rw-r----- 2.0 unx 6472 bl defN 18-Jan-17 16:20 com/google/cloud/translate/TranslateOptions.class
-rw-r----- 2.0 unx 1895 bl defN 18-Jan-17 16:20 com/google/cloud/translate/TranslateOptions$TranslateDefaults.class
-rw-r----- 2.0 unx 250 bl defN 18-Jan-17 16:20 com/google/cloud/translate/TranslateOptions$1.class
-rw-r----- 2.0 unx 3607 bl defN 18-Jan-17 16:20 com/google/cloud/translate/TranslateOptions$Builder.class
-rw-r----- 2.0 unx 1716 bl defN 18-Jan-17 16:20 com/google/cloud/translate/Translate$TranslateOption.class
-rw-r----- 2.0 unx 1289 bl defN 18-Jan-17 16:20 com/google/cloud/translate/TranslateOptions$DefaultTranslateRpcFactory.class
-rw-r----- 2.0 unx 1255 bl defN 18-Jan-17 16:20 com/google/cloud/translate/TranslateOptions$DefaultTranslateFactory.class
which suggests that the JAR has the class you're looking for.
Metadata
Metadata
Development
No branches or pull requestsIssue actions