Adding opencv to android studio: Dependent features configured but no package ID was set
I am trying to add OpenCV to my AndroidStudio project. However, I get the error mentioned above, when trying to build the project: «Dependent features configured but no package ID was set.»
I used the following link for the implementation: https://android.jlelse.eu/a-beginners-guide-to-setting-up-opencv-android-library-on-android-studio-19794e220f3c I was not able to follow step 5, because there was no option to choose from. It was just a blank screen. I assumed, that AndroidStudio already performed that step automatically. I was able to access Objects from openCv like «Mat», but when building the project, I got the error mentioned above.
If you need more information, please let me know.
See also questions close to this topic
I would like to convert below code with Java’s 8 Stream. I’m new to streams. Please help to improve this code.
Required filename-based automodules detected. Please don’t publish this project to a public artifact repository!
How do I find out what automodules are being added, and what their stable names are?
I have the following response coming from a rest call and performing some logic based on what is returned.
This is what I want.
If the overall status code is NOT 200 OR If within the list of SimpleResponse , none of the SimpleResponse objects has a 200 httpCode , throw an error.
The example below is incomplete.
- Too much going on there, having an optional within another optional.
- And then throwing the same error at 2 different places.
- Also if the optional result is null say at responseEntity.getBody() , would want to throw same error too.
Is there a cleaner way to write this?
These are the 2 related objects
Method calling rest call and throwing error if needed.
So I have this «book an appointment with a doctor» fragment that has 4 exposed dropdown lists with the following structure (see a picture here):
I want to make them dependable as in choosing a hospital provides certain doctors then certain doctors certain dates and times they are available. How can I go about that ? For now Ihave the dropdowns as independent, having each their own elements.
I also provide the code of the fragment that also leads to a confirmation of appointment activity just in case its helpful :
I am trying to output the google profile picture in my app. However, I have an error here and don’t know where it is. The App just always closes directly unfortunately. Does anyone know another method or recognize my error ?
»’ String personPhotoUrl = acct.getPhotoUrl().toString(); Glide.with(this) .load(personPhotoUrl) .transition(withCrossFade()) .apply(new RequestOptions().override(100, 100) .placeholder(R.drawable.ic_launcher_background) .error(R.drawable.ic_launcher_background).centerCrop() ) .into(imgProfilePic); »’
I pretty new in android studio, and I’m working on a project that I build barber’s scheduling app. I’m trying to figure out how should I do it. I’m using Firebase as my DB. What I do not understand is how I actually create a schedule and be able to synchronize data in real time. If, for example, a user has made a new appointment or is interested in making an appointment, how can I get the free times? I would love to get guidance and help how should I build it properly and what to use?
This is the follow up question to my previews one Extract stripes from low contrast grayscale images.
After some research and considerations, my question now is how to trim each of the stripes I got from my previous operations.
My stripes are now look like these:
and I want to trim them to get only the high lighted parts like:
and
. (some pixels may not be visible due to the low gray scale value)
I tried the otsu threshold in OpenCV, but it does not seem to work because of the majority pixels are background black. In addition, each stripe has different contrast because of the uneven lighting condition.
This job seems to me now is to mark all the pixels on the plateau and drop those below some level, but I have’t figure out a good way to do it so far.
Please advice and thanks in advance!
I vould like to convert my python script which uses opencv and camera to an .apk file so that it can be used on android. My script finds edges and uses live camera. And when converting it I helped with this tutorial: https://www.youtube.com/watch?v=s-6rwrstImI. First I tryed using his code and following his steps. In the result the program worked and it displayed the image as used in the tuturial. But when I tryed making it work for my own camera based program it crashed. Any ideas?
I belive that I made an error when making the window dimensions, vould it be better if the window was displayed in pygame instead of opencv?
Here is my script (main.py):
To convert it to a .apk file I firstly uploaded my script to google colab and than I used these commands (they are shown under the tutorial video):
- !pip install opencv-python
- !pip install buildozer
- !pip install cython==0.29.19
- !sudo apt-get install -y
python3-pip
build-essential
git
python3
python3-dev
ffmpeg
libsdl2-dev
libsdl2-image-dev
libsdl2-mixer-dev
libsdl2-ttf-dev
libportmidi-dev
libswscale-dev
libavformat-dev
libavcodec-dev
zlib1g-dev - !sudo apt-get install -y
libgstreamer1.0
gstreamer1.0-plugins-base
gstreamer1.0-plugins-good - !sudo apt-get install build-essential libsqlite3-dev sqlite3 bzip2 libbz2-dev zlib1g-dev libssl-dev openssl libgdbm-dev libgdbm-compat-dev liblzma-dev libreadline-dev libncursesw5-dev libffi-dev uuid-dev libffi6
- !sudo apt-get install libffi-dev
- !buildozer init
- !buildozer -v android debug
Than I just changed app name in the buildozer.spec file (title = Camera app), and after it finished, I installed the app on my phone via USB cable, like I did after following the tutorial.
But, whan I ran it it just crashed.
help meee TT i received error in my coding of social distancing detection system using webcam. i done search the error but there is nothing difference with my code TT i wite my coding using notepad++ and run using command prompt. below is my error :
below here is my full code of file detection.py
why when I use mCamera.setPreviewDisplay(getHolder());, at JavaCameraView.java, I can’t draw Contours,. Help me, please! mCamera.setPreviewDisplay(null);
According to the sample code given by opencv, the rms returned by calibrateCamera is the reprojection error, and the return of computeReprojectionErrors is also the reprojection error. I did an experiment and the two returned results are basically the same. So why do you need to execute computeReprojectionErrors? How to look at the relationship between rms and totalAvgErr?
I am making a project where I am using an IP camera and OpenCV to enable motion detection. Now I want to connect this setup with my Application which I designed for this project. The App should be able to live stream the video from camera and raise an alarm when it detects motion. Guide please?
PS:- I am a beginner at App dev and used android studios. So I have zero idea about any existing methods or APIs that can solve this dilemma of mine.
Источник
Dependent features configured but no package ID was set
I am developing an android app I have created two modules in the android studio when I run the project I am getting the following errors
Execution failed for task ‘:app:processDebugResources’.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade AAPT2 aapt2-4.1.2-6503028-windows Daemon #0: Unexpected error during link, attempting to stop daemon. This should not happen under normal circumstances, please file an issue if it does. Dependent features configured but no package ID was set
below my app.gradle file
what I have tried increased heap size invalidate cache restart build rebuild project clean project as well
I want to know where exactly I am making mistake what is causing an issue
See also questions close to this topic
I’m trying to show native test ads on my project (play-services-ads:20.5.0). I tried this way and get different errors with the same error code. Can’t really figure it out is it a server issue or my implementation can’t fulfill SDK’s requirements. I waited more than 2 hours (SpinUp Time) but it doesn’t worked.
public class MainActivity extends AppCompatActivity <
I’m getting two types error one is from physical device which is this:
And another is from emulator, which is this:
I got another issue while using emulator which is here:
Thanks in advance
What I have done
- I have a Facebook App that I have logged in
- I have integrated Facebook SDK in my sample app
What I am trying to do
- I am trying to get my logged in Facebook URL from my sample app
What I have tried
Whats happening
- I am not able to get the link but the name and other details I am able to get
- How to resolve this
So I have this «book an appointment with a doctor» fragment that has 4 exposed dropdown lists with the following structure (see a picture here):
I want to make them dependable as in choosing a hospital provides certain doctors then certain doctors certain dates and times they are available. How can I go about that ? For now Ihave the dropdowns as independent, having each their own elements.
I also provide the code of the fragment that also leads to a confirmation of appointment activity just in case its helpful :
I have a screen that displays 3 Lazy rows in a column. Each from a diff API.
The requirement is to show each row immediately when the corresponding API is successful. We should not wait for all the API calls to be done to show the data. When all three fail or return empty data. We have to show the Empty View/Error view.
How can we achieve this in compose?
I am getting the following error while trying to do Gradle build:
I have searched in files for continue keyword if any class or something is named as continue but couldn’t find one.
Here is my build.gradle(:app)
And here is my build.gradle (Faisan) [App’s name is Faisan]
What is «continue» here? What am I missing here? Can anyone please help me with this?
I use docker for build spring app like this
I know about openjdk image, but for testing purposes decide to use ubuntu to see what actually happened. And I saw, when build use IDE, build (with classes folder) appear and successfully running. But with docker, nothing in /usr/app only build folder with libs (conatin .jar) and temp, .jar throws an exception (not found SpringBootApplication class in the main tread), when cmd java -jar *.jar.
I’m getting either Error 1 or Error 2 on Visual Studio Code when running the default Flutter App on an Android Studio Emulator, when I run it on a Chrome device it works fine:
(Error 1) :-
FAILURE: Build failed with an exception.
What went wrong: Could not determine the dependencies of task ‘:app:compileDebugJavaWithJavac’.
Cannot query the value of this provider because it has no value available.
Try: Run with —stacktrace option to get the stack trace. Run with —info or —debug option to get more log output. Run with —scan to get full insights.
BUILD FAILED in 1s Exception: Gradle task assembleDebug failed with exit code 1 Exited (sigterm)
(Error 2) :-
FAILURE: Build failed with an exception.
Where: Script ‘C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle’ line: 641
What went wrong: A problem occurred evaluating root project ‘android’.
A problem occurred configuring project ‘:app’. Could not create task ‘:app:assembleRelease’. > Could not create task ‘:app:lintVitalRelease’. > SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or by setting the sdk.dir path in your project’s local properties file at ‘C:\Apps\little_keeper\android\local.properties’.
Try: Run with —stacktrace option to get the stack trace. Run with —info or —debug option to get more log output. Run with —scan to get full insights.
In cmd Flutter Doctor shows no errors. All Environment Variables have been added.
When I create a new Project in android studio I get a gradle error:
I havec searched for this issue, and found that deleting the cache folder from C:\Users\\[Username]\\.AndroidStudio4.0\system\ might work, but I can’t find this directory on my PC.
I even uninstalled android studio, still same thing..
How do I fix this please?? Maybe how to locate the directory?? or another way to this this error?? and what caused this it was working fine just yesterday??
Getting this message when I click run:
The answers from Error message «Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8» to change the gradle JDK in settings work. but only for that one project. When I create a new project, Android Studio automatically use default 1.8 again.
I have 11 available, AS just don’t automatically use it. Things I tried: changed the JAVA_HOME env to the location for JDK 11 here, but still get the same error.
Invalid cache /restart a bunch of time does nothing
How to set it once and apply to all future new project?
We are a company with 10+ apps all using 10+ internal SDKs, all coded back at the glorious time of the kotlin-android-extensions gradle plugin. We heavily rely on both @Parcelize and synthetic binding (all our views are coded with it). With the newer versions of Kotlin, this plugin is now deprecated in favor of kotlin-parcelize for @Parcelize and View Binding as a replacement for synthetic binding.
We tried to upgrade our Kotlin version from 1.4.10 to 1.6.0 while still using the kotlin-android-extensions plugin. We suddenly had a @Parcelize error reported here, fixed in Kotlin 1.5.0 . Except that the fix is not in Kotlin itself, it is in the kotlin-parcelize plugin. And of course as they deprecated kotlin-android-extensions , the later doesn’t contain the fix. So in short, in order to fix the issue we have to use kotlin-parcelize .
Knowing that kotlin-parcelize can’t be used along kotlin-android-extensions (build error), and that switching all our views from synthetic to view binding will be a hell of a work that will take a tremendous amount of time, what can be done here ? We really want to keep using synthetic binding while being able to upgrade Kotlin to its latest versions.
Источник