I just started working on android open source project and I am trying to modify the settings application but when I am importing it with android studio and trying to compile I get this error
Error:Execution failed for task ':app:mergeDebugResources'.
/app/src/main/res/values-nl/strings.xml: Error: Found item String/sdcard_unmount more than one time
Seems like there are multiple statements of string such as
<string name="sdcard_format" product="nosdcard" msgid="6285310523155166716">"USB-opslag wissen"</string>
<string name="sdcard_format" product="default" msgid="6713185532039187532">"SD-kaart wissen"</string>
It is causing errors, how can it be fixed?
For anyone looking for answers, this other one in SO is much better: Error:Error: Found item String/photoPickerNotFoundText more than one time
you need to change the package name, because u r installing setting app on device which already have the setting app with same package name. you have to import the code modify it and then copy the new src and res directory in to aosp and create the image of android.
Related
I'm new to NativeScript and took over a project recently upgraded from NativeScript 4 to 6. Here is my environment detials:
Windows 10
Node v16.6.1
NativeScript 8.0.2
Android Studio 11 (with al
the recommended updates to date)
VS Code 1.58.2
I can create a new Native script project with "tns create" and build/run it in the simulator just fine. However, when I try to run the project the build throws the following error:
java.lang.RuntimeException: Class not found android.support.v4.view.ViewPager.OnPageChangeListener
at org.nativescript.staticbindinggenerator.Generator.getClass(Generator.java:551)
at org.nativescript.staticbindinggenerator.Generator.getInterfacesFromCache(Generator.java:534)
at org.nativescript.staticbindinggenerator.Generator.writeBinding(Generator.java:283)
at org.nativescript.staticbindinggenerator.Generator.generateBinding(Generator.java:171)
at org.nativescript.staticbindinggenerator.Generator.processRows(Generator.java:234)
at org.nativescript.staticbindinggenerator.Generator.generateBindings(Generator.java:121)
at org.nativescript.staticbindinggenerator.Generator.writeBindings(Generator.java:97)
at org.nativescript.staticbindinggenerator.Main.main(Main.java:55)
Here is the run command I'm using: "tns run android --emulator"
I have tried tons of things and searches but no luck resolving this issue.
So I had an idea and searched with a different search engine than I normally use. I did find some ideas which helped me resolved the issue.
I had previously searched in VSCode for variations on "android.support.v4.view.ViewPager.OnPageChangeListener", but only found the log file with the error. Then I learned you have to change the filter options of the find in file search otherwise the files you are looking for can be excluded from the search results. I also used Baregrep to confirm I was getting everything.
I fixed the issue by replacing all occurrences of:
android.support.v4.view.ViewPager with androidx.viewpager.widget.ViewPager
Also you may need to install widgets:npm i tns-core-modules-widgets
Since the files where I made the changes were all non-project files (many of them in the node_modules directory) there is probably something else that involves updating Node or NativeScript that may solve this as well.
If someone else figures that out, I'll be watching this thread for updates, and thanks in advance!
Fissh
I am trying to build an android application with OF. The application runs in two other computers. However, it does not work on mine. I am using a mac.
I run the command "make AndroidDebug" in the project folder, and this is the error I have:
/Library/openFrameworks/addons/ofxHTTP/libs/ofxHTTP/src/PostRouteFileHandler.cpp:98:46: error: invalid use of incomplete type 'class Poco::Path'
ss << Poco::Path(formFileName).getExtension();
I have installed poco, but nothing changes afterwards.
What can I do to solve this?
Thanks
Have you included Poco/Path.h?
A forward declaration might appeared earlier (possibly in another header) without complete definition.
this might seem trivial but I can't understand why I'm getting this error.
I downloaded the sample app activityInstrumentation( from Android Studio File -> import Sample) and inside the testing project manifest I get an unresolved symbol for
android:targetPackage="com.example.android.activityinstrumentation".
After that I've created a manifest for my application and still there is an unresolved symbol on the attribute.
My application project dir and test project dir are:
app/src/main/java/com/example/appname
where manifest has
package="com.example.appname"
app/src/androidTest/java/com/example/appname
where manifest has
<manifest
...
package="com.example.appname.tests"
...
android:targetPackage="com.example.appname"
...
</manifest>
Please help me sort this out. I don't know what else I can do: using a sample app to create a full fledged test project was my very last hope.
You must specify android:targetPackage in instrumentation tag.
[http://developer.android.com/guide/topics/manifest/instrumentation-element.html
]
I see the same thing. Seems to be only false alert produced by the lint code inspection. When you run analysis (Analyze->Inspect code...) and open "Inspection" tab you can select the warning and mark it Suppress for tag. That will get rid of the warning.
I am trying to implement my own launcher (making some modifications to the launcher provided by google ). But since i cant remove the default launcher i renamed my package name and everything . Initially the package name was com.android.launcher2 . I changed every instance it to com.rohit.grid . Now if I run it i am getting this error 'Re-installation failed due to different application signatures' .Now the manifest file has some something called com.android.launcher in the permission tags & in the packge name . If i replace it with com.rohit.grid I will get errors in xml files about some resource being not resolved.
I tried cleanoing the project, fixing its properties & everything . But it dint help .
Somebody plz get me out of this problem .
Thanks in advance.
Regards,
Rohit
I think 'Re-installation failed due to different application signatures' means that the installer is trying to install an APK with the same name that an installed one, but the problem in this case is that the installed is signed with a different key than yours.
Instead of modifying your manifest try to rename the project and then reinstall.
Created a profile using content provider. After running it correctly, added 3 fields to the table. But now its not working correctly.It shows an error like android.content.res.Resources$NotFoundException: String resource ID #0x4d2.Any solution?
If you are using Eclipse, try to do Project|Force Clean. If you are working outside of Eclipse, run ant clean. Your error message is probably because your resources, the generated R.java file, and some of your other compiled code are collectively out of sync.