This may be a silly question but here it goes:
I'm developing my first app with phonegap, and currently targeting android only. But this is the second time I face this problems, in my project folder, through CLI I run cordova build android, the apks were not generated.
After a LONG time debugging, and undoing my recent changes. I finally tried to compile it in Eclipse, to check if it was an android compilation error, just to find out that I have copied some test images, and the names got something copy (1).png, and android don't allow that name...
So, How do I check, from command line, the logs/errors generated by phonegap/cordova buid?
You can run the CLI in debug mode with the -d option.
cordova -d build android
This way you will get a lot more detailed report.
I'm sure you have this figured by now but just in case you, or anyone else still needs help, you may be encountering this issue because of your antivirus. I had a similar issue where when I tried to build my application. Though there were no errors being given, it was not building any APK's.
The fix for me in this situation was by temporarily disabling "Auto-Sandbox" in Comodo, (the antivirus I was using).
Hopefully this helps anyone having the same issue.
Related
I was testing the new version of Ionic framework with Capacitor as I tried to build and run my app on emulator and my device I faced this error without success in installing app
No Compatible APKs found for the device.
after lots of search and struggling to fix this and lots of fails, as I was talking to one of my friends about it I realised maybe this is related to build configuration.
as I could not find similar anywhere I decided to share the answer here maybe helps and save someone time.
No Compatible APKs found for the device.
This error appears to your Build Output when android studio cannot find the related APK file generated, so by a simple change in your buid configuration you can fix this, in my case I fixed the problem like this:
thorugh this section select:
Edit Configuration
default Deploy option under Installation option is set to
APK from app bundle
by changing it to
Default APK
you'll be able to build and run your app successfully.
I hope it help you to run your shiny app asap ;p
I've made an app using kivy and python 3.7, on OSX. It runs quite well within the PyCharm environment. However, buildozer keeps throwing up errors when I try to compile the app with buildozer.
I have installed the latest buildozer using the pip3.7 command. I have even updated python-for-android to test it out. I am also currently using the Android NDK r19c, although I have tried it with r17c and r20. Neither have worked.
Originally, I had errors relating to the use of pip, instead of pip3.7, since buildozer would try to use python 2.7 in some areas. This was solved by uninstalling buildozer etc. and reinstalling with pip3.7. Those errors have gone but at the moment, I seem to be getting new errors, related to 'Silex' and pypandoc, which is strange since I don't believe buildozer even uses those.
The error codes have too many characters to allow me to post them directly here, so please see the error codes as a page on my website. The links are below:
https://apilotslens.com/buildozer-silex-error
I then install the most recent version of Silex, which stops this error coming. However, a new error comes, relating to pypandoc:
https://apilotslens.com/buildozer-pypandoc-error
Even when I install pypandoc, the error keeps appearing.
I am very confused at this point. I have supposedly done everything by the book, so that buildozer will compile my APK. I really hope someone can help me. As far as I am aware, Buildozer doesn't even use Silex or pypandoc, so why would they be appearing? They haven't even been mentioned before. I really want to get this sorted soon.
Thanks in advance!
I'm pretty sure I haven't touched the file manually at all. The only thing I have tried is a clean: buildozer android clean but that hasn't got it working.
This only cleans the build, not the full cache. Delete /Users/JGolding/Desktop/FlightPlanningApp/PythonCode/Drafts/Draft1/.buildozer and try again.
Wait, do you mean shlex or silex?
It should read import shlex. Your file reads import silex.
Here's the link to the toolchain.py file you mentioned:
This looks good except for the shlex->silex change.
I thought I'd try uninstalling and reinstalling buildozer (pip3.7 uninstall buildozer) but interestingly, it says Can't uninstall 'buildozer'. No files were found to uninstall.
This is something unrelated arising from your pip invocation targeting the wrong directory or something.
I then install the most recent version of Silex, which stops this error coming. However, a new error comes, relating to pypandoc:
This is also unrelated, it's just that the silex module doesn't support python 3. The silex module was always a red herring, it's just the letter switch in your copy of toolchain.py that is wrong.
Note that if you read the error, it isn't complaining about pypandoc but about SyntaxError: Missing parentheses in call to 'print'..
How to understand what and why really happens behind Gradle: Build? There is no console or crashes, just endless building. Maybe there is network issue which happens again and again, but how can developer know it?
This is a sample of just new project:
From terminal everything works fine. So the question is not about how to solve particular problem, but more about generic solution when IDE doesn't show anything except "progress".
You can execute ./gradlew build manually in the terminal to see its logs. You can also add --debug or --stacktraceparameter to enable verbose logging.
I have a similar answer to Andre, but with a suggestion of some potential culprits.
If an issue is happening, Android Studio is just a GUI wrapper on the terminal. So just run the commands and see what the hold up or error is.
However, Often times when I see freezing up that takes a long time to fail it is network related items. Such as an internal Maven repo that is not resolving properly. So check your internal Maven repos as well that they exist and you set them up correctly.
You can also turn off the internet and start it up, it will load into offline mode and not attempt to load any internet items and offers popup to move to offline mode in gradle. This will give you a chance to make your corrections until Android Studio improves these issues.
Rather than Choosing Start a New Android Project, Open an Existing Project and then
goto file>>new >>new Project
If You create android project by following these steps , You can see every error of you gradle build in
logcat
After I've updated android project gradle version to 3.0.0 I've faced weird issue. When I'm trying to install my app with Fabric or send *.apk via email it says "App cant be installed" but when I work directly with IDE everything is fine.
I've already spent a lots of hours browsing all known gradle 3.0.0 issues, but didn found anything.
Maybe anybody faced similar issue?
P.S. sorry, there is no match code to share, because I think its not related on configurations, cause it works via Android Studio.
Maybe anybody faced similar issue?
Yes, and I blogged about it a couple of days ago.
If you are going to distribute the APK, build the APK explicitly for that role, such as:
Using the “Build APK(s)” menu option
Using the assembleDebug or assembleRelease Gradle tasks
The APK from an IDE build now has FLAG_TEST_ONLY set, and such an APK cannot be installed normally. adb install -t will install it, but that would require the recipient to have the Android SDK.
Adding to CommonsWare answer, there is one more issue.
You might enabled Instant Run. One major drawback of this feature is, you can not use apk for other device (other than the device which you are using for development).
If so, after disabling this feature you will be able to use created apk (debug apk) to other device also (by using unknown sources option or adb option)
The issue I've had over the past few months is that Android Studio would often get stuck on Gradle: build, as seen here. Android Studio itself would stay responsive but the build simply wouldn't progress. It also never generates any kind of error, so I can't really post any useful information. Once in a blue moon it might suddenly work, but nothing reliable.
Recently I found a post here on Stack Overflow where someone's Android Studio would get stuck on Gradle: build when he tried to create a new project, and he noticed that this issue didn't exist in the 32-bit version of Android. So I thought, why not try that. Turns out that building isn't an issue anymore, but assembleDebug is, when trying to build the application. As can be seen here.
Of course all these commands work flawlessly when run using command prompt and gradlew.
What I've tried so far:
Reinstalling Android Studio (including the removal of .AndroidStudioProject)
Upgrading Android Studio to the latest version
Removing any build files from projects
Creating completely new projects in Android Studio
Switching from 64-bit to 32-bit Android Studio
I'm running the latest version of Android Studio, using version 19.1.0 of the build tools, gradle v0.11+ and am on Windows 8.1.
Is there anything else I can try? This is starting to become seriously annoying. The last possible solution I can come up with is just doing a complete format and a fresh Windows installation.
I was experiencing the same problem, and the solution was very unexpected in my case: AVAST antivirus was somehow interfering with the Gradle:build process.
Deactivating this antivirus solved the problem!
Because there is no answer to this problem I will share, what I have done, to solve this issue. From what I have seen, the problem is that there is a dependancy(or many) from a maven repo that can not be loaded. So you have to take all dependacy one by one and check if exist on the maven repo.
For example I was having a dependancy for "org.jraf:android-switch-backport:1.3.1" from "http://JRAF.org/static/maven/2" that at that time could not be opened.
My build.gradle looked like this:
repositories {
mavenCentral()
maven {
url "http://JRAF.org/static/maven/2"
}
}
compile "org.jraf:android-switch-backport:1.3.1
For me, this problem occurred when I was USB tethering using an Android device. The first build took anywhere from 5-10 minutes, and every subsequent build took about 3-7 seconds. I found that by disabling USB tethering, the first build completed quickly (and so would all subsequent builds). After the first build completed, I could reenable USB tethering.
If you have a fresh Ubuntu 14.04 with Android Studio 1.5, you may be missing a library. Try this:
sudo apt-get install lib32z1
Another stack overflow answer
It happens 1 in 2 times for me. The hack that works for me is File->Exit and confirm exiting. Then a message shows up telling me that Gradle is running and then all of a sudden the screen to choose the device shows up. I Click NO and all goes well again.
Anyway, still a bummer, but I have not found an answer yet.
My problem was that the Android Sdk executables were missing the executable bit. You can check some of your binaries like /Sdk/build-tools//aapt to see if they have permission to execute. If not you can solve it by running this on the Sdk folder
chmod -R +x ./
If you are behind a proxy on ubunthu you might need to set your gradle system wide proxy:
sudo nano ~/.gradle/gradle.properties
And enter the following entries:
systemProp.http.proxyHost=<Your Host>
systemProp.http.proxyPort=<Your Host Port>