E Expert New Member Licensed User Longtime User Feb 5, 2013 #1 I'm trying to use a working java project as library in B4A. I've followed the instructions given in Create Simple Library to export .jar file & to generate xml file.:sign0104: But when i try to use that object in a B4A project it throws error while compiling which says : Parsing code. 0.00 Compiling code. 0.08 Compiling layouts code. 0.00 Generating R file. 0.31 Compiling generated Java code. Error javac 1.7.0_03 src\b4a\example\main.java:232: error: package com.example.finalimagezoom does not exist public com.example.finalimagezoom.ImageZoomWrapper _it = null; ^ 1 error I'm clueless with what could have went wrong. Any idea as to how can i overcome this issue.Please help :sign0163:
I'm trying to use a working java project as library in B4A. I've followed the instructions given in Create Simple Library to export .jar file & to generate xml file.:sign0104: But when i try to use that object in a B4A project it throws error while compiling which says : Parsing code. 0.00 Compiling code. 0.08 Compiling layouts code. 0.00 Generating R file. 0.31 Compiling generated Java code. Error javac 1.7.0_03 src\b4a\example\main.java:232: error: package com.example.finalimagezoom does not exist public com.example.finalimagezoom.ImageZoomWrapper _it = null; ^ 1 error I'm clueless with what could have went wrong. Any idea as to how can i overcome this issue.Please help :sign0163:
warwound Expert Licensed User Longtime User Feb 5, 2013 #2 javac 1.7.0_03 Click to expand... You're compiling the library using java 7, there's many reports of problems with java 7. Class not found type exceptions when you compile with java 7 are common. The solution is to compile with java 6. Martin. Upvote 0
javac 1.7.0_03 Click to expand... You're compiling the library using java 7, there's many reports of problems with java 7. Class not found type exceptions when you compile with java 7 are common. The solution is to compile with java 6. Martin.
E Expert New Member Licensed User Longtime User Feb 5, 2013 #3 Thanks Martin. But I still get the same error even after changing path config to point to jdk1.6 javac.exe. Last edited: Feb 5, 2013 Upvote 0
Thanks Martin. But I still get the same error even after changing path config to point to jdk1.6 javac.exe.
Erel B4X founder Staff member Licensed User Longtime User Feb 5, 2013 #4 Open the jar file with a zip program (7zip recommended) and see whether there is a file named: com\example\finalimagezoom\ImageZoomWrapper.class Upvote 0
Open the jar file with a zip program (7zip recommended) and see whether there is a file named: com\example\finalimagezoom\ImageZoomWrapper.class
E Expert New Member Licensed User Longtime User Feb 5, 2013 #5 No .class files ,only .java files are there. EDIT: Thanks Erel. It is fixed now. Last edited: Feb 5, 2013 Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Feb 5, 2013 #6 You didn't export the jar file correctly. It should only include class files. Upvote 0
warwound Expert Licensed User Longtime User Feb 5, 2013 #7 You can also decompile the APK file using dex2jar. dex2jar will create a JAR file which contains the java classes that have been compiled into your APK. You can open this JAR with JD-GUI. Now you can see those java classes have been compiled into the APK. (Erel's advise will show you which classes have been compiled into your B4A library JAR, this solution will show you which classes have been compiled into the APK). Martin. Upvote 0
You can also decompile the APK file using dex2jar. dex2jar will create a JAR file which contains the java classes that have been compiled into your APK. You can open this JAR with JD-GUI. Now you can see those java classes have been compiled into the APK. (Erel's advise will show you which classes have been compiled into your B4A library JAR, this solution will show you which classes have been compiled into the APK). Martin.
E Expert New Member Licensed User Longtime User Feb 5, 2013 #8 Yes i had not checked "Export generated class files and resources". Now it is working fine.Thanks a lot Erel. Last edited: Feb 5, 2013 Upvote 0
Yes i had not checked "Export generated class files and resources". Now it is working fine.Thanks a lot Erel.
R romario11 Member Licensed User Longtime User May 2, 2013 #9 hey i have the same problem B4A line: 899 StatusCursor=DownloadManager1.Query(DownloadManagerQuery1) javac 1.7.0_21 src\Ideafix\Ideafix\main.java:478: error: package android.app.DownloadManager does not exist Upvote 0
hey i have the same problem B4A line: 899 StatusCursor=DownloadManager1.Query(DownloadManagerQuery1) javac 1.7.0_21 src\Ideafix\Ideafix\main.java:478: error: package android.app.DownloadManager does not exist
warwound Expert Licensed User Longtime User May 2, 2013 #10 romario11 said: hey i have the same problem B4A line: 899 StatusCursor=DownloadManager1.Query(DownloadManagerQuery1) javac 1.7.0_21 src\Ideafix\Ideafix\main.java:478: error: package android.app.DownloadManager does not exist Click to expand... Which version of Android are you trying to run this on? DownloadManager requires a minimum Android API level of 9 (Gingerbread), some features of the library require higher API levels. Click to expand... http://www.b4x.com/forum/additional...updates/22306-downloadmanager.html#post129464 Martin. Upvote 0
romario11 said: hey i have the same problem B4A line: 899 StatusCursor=DownloadManager1.Query(DownloadManagerQuery1) javac 1.7.0_21 src\Ideafix\Ideafix\main.java:478: error: package android.app.DownloadManager does not exist Click to expand... Which version of Android are you trying to run this on? DownloadManager requires a minimum Android API level of 9 (Gingerbread), some features of the library require higher API levels. Click to expand... http://www.b4x.com/forum/additional...updates/22306-downloadmanager.html#post129464 Martin.
E elbelli2008 Member Licensed User Longtime User May 5, 2013 #11 I have downloaded a chart library from Android Controls - Free Android Controls Library - IguanaUI Infragistics Android Controls But only have a .jar file., Do You tell to me how I can create .XML file to use this library ?? thanks. Nicolas Upvote 0
I have downloaded a chart library from Android Controls - Free Android Controls Library - IguanaUI Infragistics Android Controls But only have a .jar file., Do You tell to me how I can create .XML file to use this library ?? thanks. Nicolas
Erel B4X founder Staff member Licensed User Longtime User May 6, 2013 #12 Please do not make duplicate posts. Upvote 0