I am developing a Android application with target Android 2.1.
In this application I try to integrate my application with Postgresql
database using jdbc driver(Drivers with which I have tested the application are:
postgresql-9.0-801.jdbc4.jar
postgresql-9.0-801.jdbc3.jar
postgresql-8.3-606.jdbc4
Also I have added in my application AndroidManifest.xml file following
line:
<uses-permission android:name="android.permission.INTERNET" />
But on running android emulator I am getting this error:
Caused by: java.lang.NoClassDefFoundError: org.postgresql.Driver
Please suggest me some work around to solve this problem
Related
Hi,
I've a magic 32B with cyanogenmod v4.2.15.1.
I would like to import StartSSL and FreeSSL certificates authority.
To do this I modified /etc/security/cacerts.bks with keytool on my pc, push the new cacerts.bks to my phone, changed permissions (644), and rebooted the phone.
Now I can connect to FreeSSL https websites without any warning. But the Android Market stops working: I can't download and install apps.
I've this log:
Code:
W/vending ( 776): com.android.vending.api.RequestDispatcher.performRequestsOverNetwork(): IOException while performing API request: Delayed instantiation exception:
E/vending ( 776): com.android.vending.AsynchRequestRunner$1.runRequestRetryingFailure(): Got IOException from async request: Delayed instantiation exception:
D/vending ( 776): com.android.vending.api.LocalAssetDatabase.notifyListener(): -4182933297171720279 / DOWNLOAD_FAILED
If I restore the original cacerts.bks, market works fine, but of course I've warnings with FreeSSL websites.
Can you help me to install FreeSSL CA without disturbing Android Market ?
Thanks.
for citrix client, i've edited cacerts.bks too.
i've used a java program, portecle:
http://portecle.sourceforge.net/
download it, then launch it with the windows command: java -jar portecle.jar
with this tools, open cacerts.bks, and import your ca cert
save the bks and push it into your phone, for me it has worked!
Many logcat reading applications fail to read logcat on Android 4.1+ (Jelly Bean). The few that are working well are using root features. This post contains a code sample that can be easy included in existing logcat applications to make them rooted Jelly Bean compatible.
Root cause of the problem:
Android permission android.permission.READ_LOGS is required to read logcat.
Starting from Android 4.1 it is no more granted to regular apps upon installation, but it can be granted using pm grant command under root.
Solution for users (of Jelly Bean incompatible logcat reading apps):
Invoke the following command as root (replacing org.jtb.alogcat with package name of logcat reading application) to grant the missing permission
Code:
pm grant org.jtb.alogcat android.permission.READ_LOGS
Show application's developers this thread.
Solution for developers:
Here is code sample for automatically detecting lack of the permission and granting it with root features: This code grants permission for reading logs only after relaunching applications VM (usually after first reboot or after opening other applications and returning to app having this code).
Code:
import eu.chainfire.libsuperuser.Shell;
// DON'T USE THIS CODE. SEE PROPER CODE BELOW!
if(context.getPackageManager().checkPermission(android.Manifest.permission.READ_LOGS,
context.getPackageName()) != android.content.pm.PackageManager.PERMISSION_GRANTED) {
Shell.SU.run("pm grant "+context.getPackageName()+" "+android.Manifest.permission.READ_LOGS);
}
Solution for developers:
Download and add AdjustReadLogsPermission.java to your project as a new class (or directly into Activity class of the main activity (as nested static class - by changing class definition to private static class).
AdjustReadLogsPermission should be called from onCreate method of the Activity class of application's main activity (activity that will be opened when launching the application) by this code:
Code:
AdjustReadLogsPermission.adjustIfNeeded(this);
AdjustReadLogsPermission detects lack of android.permission.READ_LOGS permission and asynchronously grants it using root features and relaunches the application.
This post (as well as all my posts) including any code in it is provided AS-IS without warranty of any kind!
Parts of this code come from libsuperuser_example. This code is distributed under Apache License.
As this code uses libsuperuser (made by @Chainfire, distributed under Apache License) it is required to download it and add reference to it in application's project.
As this code uses root features it is recommended to declare uses-permission android.permission.ACCESS_SUPERUSER in application's AndroidManifest.xml.
I hope this article will help developers of logcat reading applications!
Sorry for resurrecting this old thread, but I found a way to access logs without root permissions. You can use remote debugging feature. Here is an open source Lagcat app that I developed that uses this approach.
I have created an app using just html/css.
The app is build by html.I followed this guy's tutorial.As i can't publish the link I am publishing his tutorial ..
Are you a web designer or you can HTML,CSS and Java Script? If your answer is Yes, You can make android app with HTML, CSS and Java scripts knowledge! In this post I’ll show you how can you make an Android app with Just HTML css with phone gap.
What you have need
adt-bundle ( 32 bit windows version download) You can download for your OS platform here
PhoneGap ( Download )
An Android phone.
Procedure:
Open adt-bundle folder and open eclips
Create an android project by eclips
Extract PhoneGap and copy the cordova-2.9.0.js file.
In left side click on Package Explorer and paste the cordova-2.9.0.js file in assets>www folder
Copy cordova-2.9.0.jar file and paste it in Libs folder like as image below
phone gap app develop
Now open the MainActivity.java file from src folder. In this file replace the public class MainActivity extends Activity line with public class MainActivity extends DroidGap
write super.loadUrl(Config.getStartUrl()); in the place of setContentView()
eclips ide
Now add this code in AndroidMainfest.xml file at <uses-sdk…/> and <application…/> tags
<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:resizeable="true"
android:anyDensity="true" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.BROADCAST_STICKY" />
android mainfest file
refresh the project. Now create a index.html file in assets>www folder. The app will show you whatever you write in index.html file. You can add more html file link with index.html file like as a website.
After following his guide I succeded to create an android app using basic html/css.
But now I got a problem.I can't add admob ads on the app.I tried a lot but eclips shows atleast 1 problem rather I can't add admob ads on my apps.
plz help me?/
nissan0808 said:
I have created an app using just html/css.
plz help me?/
Click to expand...
Click to collapse
Hi there,
As the rules said this is not a support forum, but rather a place to get some help by being pointed to the right thread.
The mission of XDA Assist is to provide basic help to those who have tried searching but can't find what they are looking for and need assistance. This is not a "helpdesk" providing technical assistance but more to point you in the correct direction with your problem. Perhaps you can't find posts on how to root your phone, install custom recovery or maybe you have questions about how to navigate and use features on the site.
Click to expand...
Click to collapse
In other way, you can ask for help in this area General discussion > Questions and Answers or for more detailed help try to read carefully this forum Development Tools
Hello,
I would like to develop on CUDA on my shield tablet.
For the moment I can develop native application but when I try cuda tutorial with cuda_runtime.h file the project send me errors.
Code:
Description Resource Path Location Type
fatal error: cuda_runtime.h: No such file or directory SimpleCuda.cpp /SimpleCuda/jni line 4 C/C++ Problem
[/CODE
And I don't have any cuda_runtime.h file on my computer or on my tabley.
Where can I found this file to fix my error?
Best regard.
I need to sign an APK using the system keys obtained from Google's source (As an example) using SignApk.jar. However, everytime we try to Sign we get the error below...
This is the command we are using (Please note we are using the Source code downloaded from Google for Android 8.1 for the Pixel).
Besides this method, is there another way to sign an APK with the system key?
java -Xmx2048m -Djava.library.path="out/host/linux-x86/lib64" -jar prebuilts/sdk/tools/lib/signapk.jar -w build/make/target/product/security/platform.x509.pem build/make/target/product/security/platform.pk8 Unsigned-Apk.apk Signed_final_apk.apk
Error: Exception in thread "main" java.lang.ExceptionInInitializerError
at org.conscrypt.OpenSSLBIOInputStream.<init>(OpenSSLBIOInputStream.java:34)
at org.conscrypt.OpenSSLX509Certificate.fromX509PemInputStream(OpenSSLX509Certificate.java:119)
at org.conscrypt.OpenSSLX509CertificateFactory$1.fromX509PemInputStream(OpenSSLX509CertificateFactory.java:220)
at org.conscrypt.OpenSSLX509CertificateFactory$1.fromX509PemInputStream(OpenSSLX509CertificateFactory.java:216)
at org.conscrypt.OpenSSLX509CertificateFactory$Parser.generateItem(OpenSSLX509CertificateFactory.java:94)
at org.conscrypt.OpenSSLX509CertificateFactory.engineGenerateCertificate(OpenSSLX509CertificateFactory.java:272)
at java.security.cert.CertificateFactory.generateCertificate(CertificateFactory.java:339)
at com.android.signapk.SignApk.readPublicKey(SignApk.java:184)
at com.android.signapk.SignApk.main(SignApk.java:1007)
Caused by: java.lang.IllegalArgumentException: Failed to load any of the given libraries: [conscrypt_openjdk_jni-osx-x86_64, conscrypt_openjdk_jni]
at org.conscrypt.NativeLibraryLoader.loadFirstAvailable(NativeLibraryLoader.java:160)
at org.conscrypt.NativeCryptoJni.init(NativeCryptoJni.java:49)
at org.conscrypt.NativeCrypto.<clinit>(NativeCrypto.java:53)
... 9 more