-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error trying to run APP #96
Comments
did you find the solution? |
Hi, i belive it was this line that i had to change About paperdb i found a project (Paper-2.6) and i belive that i've imported the libraries directly into my project. |
oh, ok no problem |
Hi, I ran into the same issue now and I just can't fix it. I get the same error message and have no idea why. Could you please give me a hint or some idea on how to fix this? Thanks! |
Hi, can you please post the error/log? Thanks |
Sure, here it is, this is logged when I try to build the app:
and it fails for these tasks (the error message is the exact same for each of them):
|
I have it like this: } |
When I use 1.2.1 version and have it like you do, manifest merger fails, because the rest of the app supports androidx, whereas v1.2.1 doesn't. So when I use v1.3.1 of Printooth, the same errors shows up again as I posted earlier. |
@matej-dostal Hi did you fix the error? Even I am facing the same issue, can you please share the solution if you have got it |
Hi! I did fix it, but to be honest I don't remember exactly how. Could you share both your |
@matej-dostal Sure, build.grade(Module) -- android {
} dependencies {
} settings.gradle -- since, jcenter() is deprecated android studio suggests to use mavenCentral() only |
Okay, so the only difference that I found when compared with my .gradle files is in |
@matej-dostal I'm still getting the same error even after adding the above line of code in the kotlinOptions, can you please help me solve this further |
I just realised one more thing, could you post |
Yeah, sure here is the gradlde.properties file Project-wide Gradle settings.IDE (e.g. Android Studio) users:Gradle settings configured through the IDE will overrideany settings specified in this file.For more details on how to configure your build environment visithttp://www.gradle.org/docs/current/userguide/build_environment.htmlSpecifies the JVM arguments used for the daemon process.The setting is particularly useful for tweaking memory settings.org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 When configured, Gradle will run in incubating parallel mode.This option should only be used with decoupled projects. More details, visithttp://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projectsorg.gradle.parallel=trueAndroidX package structure to make it clearer which packages are bundled with theAndroid operating system, and which are packaged with your app's APKhttps://developer.android.com/topic/libraries/support-library/androidx-rnandroid.useAndroidX=true Kotlin code style for this project: "official" or "obsolete":kotlin.code.style=official Enables namespacing of each library's R class so that its R class includes only theresources declared in the library itself and none from the library's dependencies,thereby reducing the size of the R class for that libraryandroid.nonTransitiveRClass=true |
good, try adding |
class MainActivity : AppCompatActivity() {
// val intent = result.data |
@gaara40 do you have bluetooth on your device turned on, your bluetooth printer turned on and paired with the device? |
yes the bluetooth printer is turned on and is paired to my android device and the Bluetooth is also turned on in my android device |
And does your app have required permissions from user given in runtime? Without that I think you won't make it work. |
yes, the permissions are also granted |
I have these permissions required in runtime (also specified in manifest) and it works fine:
|
I had these permissions in manifest, I figured out the code now and it worked thankyou so much @matej-dostal for helping me out. There is something more I need to know, can we print custom texts like if we enter a name or a number in the edittext fields and click the print button the name and the number gets printed? |
No problem, I'm happy to help :) Sure thing we can, just build the printable, you send to the printer, dynamically and fill it with the input from user :) |
Got it, Thank you very much @matej-dostal for your guidance, I don't know where would I be without your help, I am trying this since 3 weeks, finally got it done. |
No problem, good luck coding the rest of the app :) @gaara40 |
my app runs only when i explicitly allow the nearby devices permission, otherwise the app crashes when I click the print button, any solutions??? tried the onrequestpermission but still not working..... |
Hi, can you try this:
BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
@OverRide Dont forget to add to the manifest "BLUETOOTH_CONNECT" permission |
still not working |
can you give more detail? |
java.lang.SecurityException: Need android.permission.BLUETOOTH_SCAN permission for AttributionSource....... |
i have this on my manifest: |
what about runtime permissions, how do i ask for runtime permissions, do you have any simple way where I can learn how to use them? |
ask for this as well:
} |
this is the solution |
Hi, since Jcenter is down i had problems trying to run my app.
First it was asking about paperdb:2.6.
Since i was unable to implment that library i've change my implementation of Printooth.
So i updated my Printooth to 1.3.1(i am not using androix)
Now it returns this error:
`Execution failed for task ':app:preDebugBuild'.
Possible solution:
Couldn't find nothing online about com.android.support:design:31.0.0.
Any suggestions?
I'm really trying not to update to androidx,
Thanks
The text was updated successfully, but these errors were encountered: