홈>
데스크톱 Gluon에서 자체 앱을 실행하면 제대로 작동하지만 휴대 전화 Sony experia에 디버거를 사용하면 로그인 UI가 표시되지만 사용자 이름과 비밀번호를 쓰면 기본 화면에 액세스 할 수 없습니다 . DB Connect와 build.gradle에 무엇을 작성해야하나요?
내 build.gradle에서 mysql 버전을 변경하려고했습니다. mysql : mysql-connector-java : 8.0.13컴파일 mysql : mysql-connector-java : 5.1.46
을 컴파일buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.javafxports:jfxmobile-plugin:1.3.16'
}
}
apply plugin: 'org.javafxports.jfxmobile'
repositories {
jcenter()
maven {
url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
}
}
mainClassName = 'com.crm.CRM'
dependencies {
compile 'com.gluonhq:charm:5.0.2'
compile 'mysql:mysql-connector-java:8.0.13'
compile 'com.jcraft:jsch:0.1.54'
}
jfxmobile {
downConfig {
version = '3.8.6'
// Do not edit the line below. Use Gluon Mobile Settings in your
project context menu instead
plugins 'display', 'lifecycle', 'statusbar', 'storage'
}
android {
javafxportsVersion = '8.60.11'
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/rxjava.properties'
exclude 'META-INF/spring.schemas'
exclude 'META-INF/INDEX.LIST'
}
// compileSdkVersio=28
manifest = 'src/android/AndroidManifest.xml'
}
ios {
infoPList = file('src/ios/Default-Info.plist')
forceLinkClasses = [
'com.gluonhq.**.*',
'javax.annotations.**.*',
'javax.inject.**.*',
'javax.json.**.*',
'org.glassfish.json.**.*'
]
}
}
이것은 connect db의 코드입니다 :
public static Connection getConnection() {
try {
//Your Database usrl using String,ensure it is correct
Class.forName("com.mysql.jdbc.Driver");
Connection con =
DriverManager.getConnection("jdbc:mysql://192.168.43.13:3306/crmywa?
useUnicode=yes&characterEncoding=UTF-8", "root", "");
return con;
} catch (Exception ex) {
Logger.getLogger(dbmobo.class.getName()).log(Level.SEVERE, null, ex);
}
return null;
}
수정
결과를 확인한 후 adb logcat이 결과를 얻었습니다 :
01-31 18:51:01.399 17374 17407 W System.err: Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
01-31 18:51:01.403 17374 17407 W System.err: Exception in Application start method
01-31 18:51:01.405 17374 17407 I System.out:QuantumRenderer: shutdown
01-31 18:51:01.406 17374 17402 W System.err: java.lang.reflect.InvocationTargetException
01-31 18:51:01.406 17374 17402 W System.err: at java.lang.reflect.Method.invoke(Native Method)
01-31 18:51:01.406 17374 17402 W System.err: at javafxports.android.DalvikLauncher$1.run(DalvikLauncher.java:188)
01-31 18:51:01.406 17374 17402 W System.err: at java.lang.Thread.run(Thread.java:761)
01-31 18:51:01.406 364 3793 I BufferQueueProducer: [SurfaceView -com.crm/javafxports.android.FXActivity](this:0x7549311800,id:2793,api:1,p:17374,c:364) new GraphicBuffer needed
01-31 18:51:01.406 17374 17402 W System.err: Caused by: java.lang.RuntimeException: Exception in Application start method
01-31 18:51:01.406 17374 17402 W System.err: at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917)
01-31 18:51:01.406 17374 17402 W System.err: at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$138(LauncherImpl.java:182)
01-31 18:51:01.406 17374 17402 W System.err: at com.sun.javafx.application.LauncherImpl.access$lambda$1(LauncherImpl.java)
01-31 18:51:01.407 17374 17402 W System.err: at com.sun.javafx.application.LauncherImpl$$Lambda$2.run(Unknown Source)
01-31 18:51:01.407 17374 17402 W System.err: ... 1 more
01-31 18:51:01.407 17374 17402 W System.err: Caused by: javafx.fxml.LoadException:
01-31 18:51:01.407 17374 17402 W System.err: file:/data/app/com.crm-1/base.apk!/fxml/login.fxml:21
01-31 18:51:01.407 17374 17402 W System.err: at javafx.fxml.FXMLLoader.constructLoadException(FXMLLoader.java:2601)
01-31 18:51:01.407 17374 17402 W System.err: at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2579)
01-31 18:51:01.407 17374 17402 W System.err: at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2441)
01-31 18:51:01.407 17374 17402 W System.err: at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3214)
01-31 18:51:01.407 17374 17402 W System.err: at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3175)
01-31 18:51:01.407 17374 17402 W System.err: at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3148)
01-31 18:51:01.407 17374 17402 W System.err: at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3124)
01-31 18:51:01.407 17374 17402 W System.err: at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3104)
01-31 18:51:01.407 17374 17402 W System.err: at javafx.fxml.FXMLLoader.load(FXMLLoader.java:3097)
01-31 18:51:01.407 17374 17402 W System.err: at com.crm.CRM.start(CRM.java:15)
01-31 18:51:01.407 17374 17402 W System.err: at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$145(LauncherImpl.java:863)
01-31 18:51:01.408 17374 17402 W System.err: at com.sun.javafx.application.LauncherImpl.access$lambda$8(LauncherImpl.java)
01-31 18:51:01.408 17374 17402 W System.err: at com.sun.javafx.application.LauncherImpl$$Lambda$9.run(Unknown Source)
01-31 18:51:01.408 17374 17402 W System.err: at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$158(PlatformImpl.java:326)
01-31 18:51:01.408 17374 17402 W System.err: at com.sun.javafx.application.PlatformImpl.access$lambda$6(PlatformImpl.java)
01-31 18:51:01.408 17374 17402 W System.err: at com.sun.javafx.application.PlatformImpl$$Lambda$7.run(Unknown Source)
01-31 18:51:01.408 17374 17402 W System.err: at com.sun.javafx.application.PlatformImpl.lambda$null$156(PlatformImpl.java:295)
01-31 18:51:01.408 17374 17402 W System.err: at com.sun.javafx.application.PlatformImpl.access$lambda$18(PlatformImpl.java)
01-31 18:51:01.408 17374 17402 W System.err: at com.sun.javafx.application.PlatformImpl$$Lambda$19.run(Unknown Source)
01-31 18:51:01.408 17374 17402 W System.err: at java.security.AccessController.doPrivileged(AccessController.java:57)
01-31 18:51:01.408 17374 17402 W System.err: at com.sun.javafx.application.PlatformImpl.lambda$runLater$157(PlatformImpl.java:294)
01-31 18:51:01.408 17374 17402 W System.err: at com.sun.javafx.application.PlatformImpl.access$lambda$5(PlatformImpl.java)
01-31 18:51:01.408 17374 17402 W System.err: at com.sun.javafx.application.PlatformImpl$$Lambda$6.run(Unknown Source)
01-31 18:51:01.408 17374 17402 W System.err: at com.sun.glass.ui.monocle.RunnableProcessor.runLoop(RunnableProcessor.java:93)
01-31 18:51:01.408 17374 17402 W System.err: at com.sun.glass.ui.monocle.RunnableProcessor.run(RunnableProcessor.java:52)
01-31 18:51:01.408 17374 17402 W System.err: ... 1 more
01-31 18:51:01.409 17374 17402 W System.err: Caused by:java.lang.UnsupportedOperationException
01-31 18:51:01.409 17374 17402 W System.err: at java.util.regex.Matcher.group(Matcher.java:383)
01-31 18:51:01.409 17374 17402 W System.err: at com.mysql.cj.conf.ConnectionUrlParser.isConnectionStringSupported(ConnectionUrlParser.java:152)
01-31 18:51:01.409 17374 17402 W System.err: at com.mysql.cj.conf.ConnectionUrl.acceptsUrl(ConnectionUrl.java:258)
01-31 18:51:01.409 17374 17402 W System.err: at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:195)
01-31 18:51:01.409 17374 17402 W System.err: at java.sql.DriverManager.getConnection(DriverManager.java:569)
01-31 18:51:01.409 17374 17402 W System.err: at java.sql.DriverManager.getConnection(DriverManager.java:219)
01-31 18:51:01.409 17374 17402 W System.err: at com.crm.dbmobo.getConnection(dbmobo.java:17)
01-31 18:51:01.409 17374 17402 W System.err: at com.crm.LoginController.<init>(LoginController.java:78)
01-31 18:51:01.409 17374 17402 W System.err: at java.lang.Class.newInstance(Native Method)
01-31 18:51:01.409 17374 17402 W System.err: at sun.reflect.misc.ReflectUtil.newInstance(ReflectUtil.java:45)
01-31 18:51:01.409 17374 17402 W System.err: at javafx.fxml.FXMLLoader$ValueElement.processAttribute(FXMLLoader.java:927)
01-31 18:51:01.409 17374 17402 W System.err: at javafx.fxml.FXMLLoader$InstanceDeclarationElement.processAttribute(FXMLLoader.java:971)
01-31 18:51:01.409 17374 17402 W System.err: at javafx.fxml.FXMLLoader$Element.processStartElement(FXMLLoader.java:220)
01-31 18:51:01.409 17374 17402 W System.err: at javafx.fxml.FXMLLoader$ValueElement.processStartElement(FXMLLoader.java:744)
01-31 18:51:01.409 17374 17402 W System.err: at javafx.fxml.FXMLLoader.processStartElement(FXMLLoader.java:2707)
01-31 18:51:01.409 17374 17402 W System.err: at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2527)
01-31 18:51:01.409 17374 17402 W System.err: ... 24 more
01-31 18:51:01.411 364 3793 I BufferQueueProducer: [SurfaceView -com.crm/javafxports.android.FXActivity](this:0x7549311800,id:2793,api:1,p:17374,c:364) new GraphicBuffer needed
여기에 이미지 설명 입력
- 답변 # 1
관련 자료
- sql - 단일 PHP 앱에서 여러 MySQL 데이터베이스에 연결
- PHP 준비된 통계를 사용하여 mysql 데이터베이스에 이미지 (blob) 삽입
- delphi - My ClientDataSetApplyUpdates가 MySQL 데이터베이스 테이블에 게시되지 않습니까?
- mysql 데이터베이스 파이썬을 만들 수 없습니다 ("서버 localhost에 연결할 수 없습니다")
- PHP에서 mySQL 데이터베이스와 해당 파일 (하이퍼 링크)에서 파일 이름의 HTML 테이블을 생성하는 방법
- vb.net - Visual Studio 또는 Visual Basic을 사용하여 xampp에서 MySQL 데이터베이스 업데이트
- java - Room 데이터베이스를 MySql Workbench와 연결하는 방법이 있습니까?
- sql - 다른 스키마 테이블에서 mysql 데이터베이스에 값을 삽입하는 방법은 무엇입니까?
- java - MySQL 데이터베이스의 내용보기
- javascript - 변수를 통해 MySQL 데이터베이스에 데이터를 삽입하는 방법은 무엇입니까?
- node.js - Node Express 앱에서 MySQL 데이터베이스에 액세스 할 수 없습니다
- 한 데이터베이스에서 다른 MYSQL로 데이터를 주기적으로 복사
- MYSQL 데이터베이스 II에서 집계 된 값 필터링
- 프로그래밍 방식으로 nodejs의 데이터베이스 (MySQL)에서 특정 테이블 만 내보내는 방법은 무엇입니까?
- Javascript를 사용하여 MySQL 데이터베이스에 확인란 배열을 저장하는 방법
- php - MySQL 데이터베이스에서 특정 사용자 레코드 삭제
- java - vaadin 10에서 테이블을 만들고 mysql 데이터베이스에서 데이터를 얻는 방법
- Python을 사용하여 MySQL 데이터베이스에 삽입 할 때 프로그래밍 오류 발생
- amazon rds - "읽기 전용 데이터베이스"대 "데이터베이스 읽기 및 쓰기"구성 mysql
- java - MYSQL 데이터베이스에 DATE 삽입 Android에서 PHP로 값 게시
트렌드
- OpenCv의 폴더에서 여러 이미지 읽기 (python)
- 파이썬 셀레늄 모든 "href"속성 가져 오기
- html - 자바 스크립트 - 클릭 후 변경 버튼 텍스트 변경
- javascript - 현재 URL에서 특정 div 만 새로 고침/새로 고침
- JSP에 대한 클래스를 컴파일 할 수 없습니다
- JavaScript 변수를 HTML div에 '출력'하는 방법
- git commit - 자식 - 로컬 커밋 된 파일에 대한 변경을 취소하는 방법
- jquery - JavaScript로 현재 세션 값을 얻으시겠습니까?
- javascript - swiperjs에서 정지, 재생 버튼 추가
- python - 화면에서 찾은 요소를 찾을 수없는 경우 셀레늄
응용 프로그램의 문제가 휴대 전화에서 열리지 않습니다 : mysql 에서이 구문으로 해결하십시오 :
그러면 대부분의 사용자를 데이터베이스에 추가합니다
그리고 잘 작동하고 있습니다
이 링크에서 가져 왔습니다. 호스트 192.168 .--- MySQL 서버에 연결할 수 없습니다
그리고 내 build.gradle :