I'm using Crosswalk with graldes.
When i'm trying to load https from XWalkView, I'm getting a SSL Certifcate Error Alert.
I heard solutions working with Cordova that you need to edit files but, not even possible since I get my dependencies from gradles here:
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:22.1.1'
compile 'org.xwalk:xwalk_core_library_beta:11.40.277.6'
}
I also see that you could, with past version, override a Client, but it seems not to work with my version, and i don't want to get past version.
How can I resolve this SSL error?
Related
This question already has answers here:
How to download libraries in Android Studio?
(4 answers)
Closed 5 years ago.
I am just a student with a very very slow internet connection and laptop. My problem is most methods of adding volley to my android studio projects requires me to use gradle online mode so it can download it.
My problem is my internet connection is very slow, and my laptop is also not that fast therefore gradle offline mode is the only thing keeping my laptop from dying everytime I use android studio.
Is there any manual way of adding volley to my project or any alternative you may know of?
Please help me, I am just a student so I do not know much.
You can use this volley library
compile 'com.mcxiaoke.volley:library-aar:1.1.0'
Download Volley Jar File from here https://drive.google.com/file/d/0B2HGUM4c0YwpZFp2aUlnNjJvV2c/view
Steps to add Jar file in Android Studio :
Put the Volley jar (in my case, volley.jar) into the libs folder
Right click it and hit 'Add as library'
After Adding Check your build.gradle at app module, you get it added implementation files('libs/volley.jar')
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:26.+'
compile 'com.android.support:appcompat-v7:26.+'
testCompile 'junit:junit:4.12'
implementation files('libs/volley.jar')
}
Android Studio 2.2.2
Compile SDK Android 7.1.1
Build Tools: 25.0.0
Gradle version: 2.14.1
Min SDK: 19
Target SDK: 25
I encountered an issue with jackson-dataformat-xml-2.8.5.jar when attempting to execute this:
JacksonXmlModule module = new JacksonXmlModule();
ObjectMapper xmlMapper = new XmlMapper(); //This line
throws the following exception
E/AndroidRuntime: FATAL EXCEPTION: Thread-418
Process: cb.myAppName, PID: 29744
java.lang.VerifyError: com/fasterxml/jackson/dataformat/xml/XmlFactory
at com.fasterxml.jackson.dataformat.xml.XmlMapper.<init>(XmlMapper.java:49)
at cb.myAppName.Core.GenerateReturnXMLFile(Core.java:863)
at cb.myAppName.RouteScreenActivity$4.run(RouteScreenActivity.java:305)
at java.lang.Thread.run(Thread.java:841)
From what I researched, it has to do with a binary incompatibility that was introduced in Jackson 1.3. As stated by Tatu Saloranta in his old blog which sadly is no longer online.
I have always valued compatibility quite highly, at least for any "non
beta" release (1.0 and above). As a result, the idea has been that any
1.x release would be simple plug-and-play over previous one. This does work for patch releases; but it turns out that not all minor releases
have worked this way. For example, versions 1.2 and 1.3 have some
unexpected incompatibilities.
Problem is this: although most commonly binary compatibility is a
harder goal than source compatibility -- that is, if you break source
compatibility, you are almost guaranteed to break binary compatibility
-- it is not strictly so. Specifically, it is quite possible to make certain changes that are source compatible, but that are NOT binary
compatible.
Specific case in point is that of changing a method that returns
nothing ("void method") into method that returns something does not
break compilation. But it does actually break binary compatibility.
UGH.
And this is exactly what happened when I decided that it would be nice
to make ObjectMapper follow "fluent" pattern, to allow for chaining of
configuration method calls. This would be nice, if it was not this
"hidden" API change...
Not quite sure how to correct this though since i'm fairly new to android development.
I already made sure to use same version of Jackson across the board as you can see in my list of dependencies from the app/build.gradle, is there something else I may be missing?
dependencies {
compile fileTree(include: ['*.jar'], exclude: ['com.symbol.emdk.jar'], dir: 'libs')
compile files('../libs/json-20151123.jar')
provided files('../libs/com.symbol.emdk.jar')
compile files('../libs/slf4j-api-1.7.6.jar')
compile files('../libs/logback-android-1.1.1-4.jar')
compile files('../libs/sun.misc.BASE64Decoder.jar')
compile files('../libs/ZSDK_ANDROID_API.jar')
compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.android.support:support-v7:22.2.0'
compile 'com.google.code.ksoap2-android:ksoap2-android:3.6.0'
compile 'com.google.code.gson:gson:2.4'
compile 'org.apache.directory.studio:org.apache.commons.io:2.4'
compile 'org.joda:joda-money:0.11'
compile 'org.apache.directory.studio:org.apache.commons.lang:2.6'
compile 'com.google.android.gms:play-services-appindexing:9.8.0'
compile 'org.greenrobot:eventbus:3.0.0'
compile 'com.fasterxml.jackson.core:jackson-core:2.8.5'
compile 'com.fasterxml.jackson.core:jackson-databind:2.8.5'
compile 'com.fasterxml.jackson.datatype:jackson-datatype-joda:2.8.5'
compile 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.8.5'
compile 'com.github.gcacace:signature-pad:1.2.0'
}
As per the official FasterXML Jackson github page, the extension i'm using should be supported...
XML: supports XML; provides both streaming and databind
implementations. Similar to JAXB' "code-first" mode (no support for
"XML Schema first", but can use JAXB beans)
https://github.com/FasterXML/jackson-dataformat-xml
This issue was also reported on the project's github page but no real solution was reached. -- github.com/FasterXML/jackson-dataformat-xml/issues/116
UPDATE: I used jarjar on the following dependencies:
compile files('../libs/cb-joda-time-2.9.6.jar')
compile files('../libs/cb-joda-money-0.12.jar')
compile files('../libs/cb-jackson-dataformat-xml-2.8.5.jar')
compile files('../libs/cb-jackson-datatype-joda-2.8.5.jar')
compile files('../libs/cb-java-json-0.13.0.jar')
compile files('../libs/cb-json-20160212.jar')
Also upgraded every single dependency to latest version as well as my appcompat and support api.
The error continues -
java.lang.VerifyError: cb/com/fasterxml/jackson/dataformat/xml/XmlFactory
at cb.com.fasterxml.jackson.dataformat.xml.XmlMapper.<init>(XmlMapper.java:49)
Hopefully someone can shine some light on this, not sure what is causing this...
After some research and tips from user aha I was able to further identify how to correct this. I haven't had time to test it since I ended up taking a different route and using SimpleXML library instead which works great for what I needed to do.
I will update this answer with more details when I do get around to testing it but here are some ways to attempt and correct this:
Include Stax as a dependency: github.com/FasterXML/jackson-dataformat-xml#android-quirks
Execute gradle dependencies. Gradle will then display the actual dependency tree that it has used to compile and package your app. The generated dependency tree might be different than the dependencies you'd declared, e.g. because of transitive dependencies. -Thanks aha
This is the original issue at github: github.com/FasterXML/jackson-dataformat-xml/issues/116
I am building an android app which uses google play services for google maps and Microsoft azure for mobile services(cloud storage).
When i use just Microsoft azure libraries i don't face any problems but when add google play libraries it gives me the following error.
Error
FATAL EXCEPTION: main
java.lang.NoClassDefFoundError: com.google.gson.GsonBuilder
at com.microsoft.windowsazure.mobileservices.MobileServiceClient.createMobileServiceGsonBuilder(MobileServiceClient.java:192)
at com.microsoft.windowsazure.mobileservices.MobileServiceClient.<init>(MobileServiceClient.java:179)
at com.microsoft.windowsazure.mobileservices.MobileServiceClient.<init>(MobileServiceClient.java:158)
at com.example.jino.navigationplacepicker.ReviewPage.onCreate(ReviewPage.java:27)
this is library dependency structure from my gradle
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.1'
compile 'com.android.support:design:23.2.1'
compile 'com.google.code.gson:gson:2.4'
compile files('libs/azuresdk-android-2.0.3/mobileservices/guava-17.0.jar')
compile files('libs/azuresdk-android-2.0.3/mobileservices/mobileservices-2.0.3.jar')
compile files('libs/azuresdk-android-2.0.3/mobileservices/mobileservices-2.0.3-javadoc.jar')
compile files('libs/azuresdk-android-2.0.3/mobileservices/mobileservices-2.0.3-sources.jar')
compile 'com.google.android.gms:play-services:8.4.0'
}
Hope you can help me out. Thanks in advance.
When you include compile 'com.google.android.gms:play-services:8.4.0' all of the play services packages are included. If you only need maps from play services, use compile 'com.google.android.gms:play-services-maps:8.4.0' instead.
See here for a list of play services modules. I am currently testing all of the modules to see which might be the culprit. Stay tuned for an update if you are curious.
I am currently unsure exactly what causes this problem. Using the entire play services collection works on most of my devices, but not any of my Android 4.4.4 devices.
UPDATE: The issue is more likely due to number of packages used and not specific packages not being compatible with Azure. Probably related to the total method count exceeding 64K (DEX64K error).
Continue using specific modules and you should be fine.
I work with Android and I use some libraries on dependencies (build.gandle).
example:
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.0'
compile 'info.hoang8f:fbutton:1.0.5'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.easing:library:1.0.1#aar'
compile 'com.daimajia.androidanimations:library:1.1.3#aar'
compile 'com.android.support:support-v4:23.2.0'
compile 'com.google.android.gms:play-services-ads:8.4.0'
}
I'm new in xamarin development and I wanna know if there something which i can use my android libraries on xamarin
thank you
I think you can make use of Xamarin.GradleBindings, Visual Studio extension, creates Xamarin Android Binding projects from external dependencies ids via gradle.
How do java developers add dependencies to their projects? Yes that's right, via gradle (something like this or that). As you can see some java-projects use those dependencies a lot (all you want to write is already written) so it'd be nice to use those huge amount of 3rd party libraries in your Xamarin project, right? I believe this Add-in for Visual Studio 2013 (and lately for Xamarin Studio) will help you with it:
Step 1: Execute the command over "References" folder
Step 2: Set an external dependency id and a name for Xamarin Android Binding Project (will be generated). This dialog will allow you to specify custom repositories as well soon.
The Plugin executes gradle scripts and receives dependencies list (including transitive ones). At this step you can select or deselect needed binaries (transitive dependencies are deselected by default).NOTE: you'd better use "Xamarin Components" or directly NuGet for Support dependencies(v4, RecyclerView, AppCompact, etc..).
Step 3: The binding project will be generated but you still may have to fix some issues via Metadata.xml because the Add-in is not smart enough.
Step 4: Now you are ready to use them! i.e. the Material Dialogs:
Reference :
https://visualstudiogallery.msdn.microsoft.com/3a3257c7-473a-4790-9610-9a561eed0b8c
https://github.com/cfraz89/xamarin-gradle-plugins
I am using smack API with openfire server to make an android app. I am trying to implement a MessageEventManager and MessageEventProvider to my app so it will tell me if the message was delivered or not though when i try to declare it a MessageEventManager, it is not compiling and tells me to create that class, What can i do? i have the following dependencies in my gradle:
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:22.1.1'
compile 'org.igniterealtime.smack:smack-android:4.1.0-rc1'
compile 'org.igniterealtime.smack:smack-tcp:4.1.0-rc1'
compile 'org.igniterealtime.smack:smack-im:4.1.0-rc1'
compile 'org.igniterealtime.smack:smack-extensions:4.1.0-rc1'
compile 'org.igniterealtime.smack:smack-android-extensions:4.1.0-rc1'
}
Do i need an extra for it? I would appreciate any help Thanks.
IMG:
Well, I might be wrong, but it seems it's not included in Smack4.1, I can't tell if it's deprecated or not since I haven't seen it on the deprecated lists, and the documentation exists here and here for the parent class.
But... what I did find is this SO answer by the Author of Smack, that clearly states that
Message events in SMACK are done via the now obsolete XEP-22. There is a good chance that the other side does not implement this out-dated mechanism.
Since this is dated 3 years back, it might be a good idea to look for another solution, or (depending on your needs, might not be recommended) use an older version Smack or aSmack.
Message event manager (XEP-22) are obsolete now, but smack team still maintain it. You can use smack legacy library throgh gradle
compile "org.igniterealtime.smack:smack-legacy:4.1.3"