Guest User

Untitled

a guest
Jul 12th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.85 KB | None | 0 0
  1. apply plugin: 'com.android.application'
  2.  
  3. android {
  4. compileSdkVersion 26
  5. defaultConfig {
  6. multiDexEnabled true
  7. vectorDrawables.useSupportLibrary = true
  8. applicationId "com.example.test.testapp"
  9. minSdkVersion 20
  10. targetSdkVersion 21
  11. versionCode 1
  12. versionName "1.0"
  13. testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  14. }
  15. buildTypes {
  16. release {
  17. minifyEnabled false
  18. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  19. }
  20. }
  21. }
  22. dependencies {
  23. //https://stackoverflow.com/questions/37048731/gson-library-in-android-studio/37049457
  24. implementation 'com.google.code.gson:gson:2.8.2'
  25. implementation 'com.android.support:design:26.1.0'
  26. // implementation 'org.mariadb.jdbc:mariadb-java-client:2.1.2'
  27. compile 'com.android.support:support-annotations:27.1.1'
  28. // implementation fileTree(include: ['*.jar'], dir: 'libs')
  29. implementation 'com.android.support:appcompat-v7:26.1.0'
  30. implementation 'com.android.support.constraint:constraint-layout:1.1.2'
  31. testImplementation 'junit:junit:4.12'
  32. androidTestImplementation 'com.android.support.test:runner:1.0.2'
  33. androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
  34. // implementation files('libs/mysql-connector-java-5.1.46.jar')
  35. // compile project(':mysql-connector-java-5.1.46')
  36. // compile project(':libs/mysql-connector-java-5.1.46.jar')
  37. implementation files('libs/mysql-connector-java-5.1.46-bin.jar')
  38. }
  39.  
  40. public ServerSave() throws SQLException, ClassNotFoundException {
  41. // load and register JDBC driver for MySQL
  42. Class.forName("com.mysql.jdbc.Driver");
  43.  
  44. this.conn = getConnection("jdbc:mariadb://remote.host.example/" + SQL_DATABASE, SQL_USER_NAME, SQL_PASSWORD);
  45. }
Add Comment
Please, Sign In to add comment