AndroidManifest no resource found - android

Ia m building react native app thats compatible with both ios and android platforms. But when I am trying to Build signed APK on Android Studio for Android platform then I am getting No resource found error in AndroidManifest file even though these files exist - anyone any idea ?
build.gradle

I think this must be a simple typo - you misspelled mipmap (you typed mitmap instead) - change the line from android:icon="#mitmap/ic_launcher into android:icon="#mipmap/ic_launcher. Hopefully the other error also disappears after fixing this? Please give it a try and let me know.

Try to run a clean after correcting the typos

Related

Gradle Error: Colliding Attributes when creating Build

when building an .apk file for Android in Unity with the Wikitude SDK I always get the Error: Gradle Error: Colliding Attributes.
I hope someone had the same problem or can solve this, because I really don't know what to do.
I would be very happy if someone could help me here!
I use Unity 2019.3.6f1 and Wikitude SDK Expert Edition for Unity 9.0.
Attached is the error log with the error itself and a video of the development process in unity, if this helps (see link*).
Thanks in advance! :)
Best regards,
Sebastian
*Link for the video: https://1drv.ms/v/s!AlxZ4c5bmzbug_MUntWtUsJlufLlrg
Error Message:
This error means that there are multiple conflicting settings for that attribute in you project. To get around this you will need to edit your AndroidManifest.xml file in your Plugins/Android folder.
If you look at the logs it will tell you a "Suggestion" on how to fix it. Just go add that override for the attribute in your AndroidManifest.xml file.

Setting usesCleartextTraffic in Eclipse Android project

I need to set the Android attribute
android:usesCleartextTraffic="true"
in an Eclipse Android project, but when I do so, it gives me the error:
No resource identifier found for attribute 'usesCleartextTraffic' in package 'android'
Any ideas on how to fix this problem?
Thanks.
I believe I found the problem. I needed to target a more recent SDK. Unfortunately doing so create a whole host of other problems which I will have to sort through, but they are unrelated to this question.

Visual Studio 2017 - Xamarin - The file "obj\Debug\android\bin\packaged_resources" does not exist

I'm fighting with that issue for 2 days already and can't find any solution.
I have an Xamarin Android app in Visual Studio 2017 consisting of three projects:
Xamarin.Android project (main one)
Android-specific unit tests run on the device - project of type NUnit 3 Test Project (Android) created using NUnit Templates for Visual Studio
Platform-independent unit tests project (project of type Unit Test Project (.NET Framework))
Everything worked just fine until now. When I selected my main project as the Startup one, my app was deployed to the device/emulator. When I selected my Android-specific unit tests project, the test project was deployed and unit tests executed by nUnit Xamarin Runners on the device/emulator.
However few days ago I updated my Visual Studio 2017 with the newest available update and now, when trying to build this android-specific unit tests project I get the following error:
The file "obj\Debug\android\bin\packaged_resources" does not exist.
I've searched everywhere, including this and this SO topics. I also totally reinstalled Visual Studio 2017 and Xamarin with Android SDK included. Nothing helped. From what I read I suspect there is something wrong with the versions of Android SDK Build-tools I have installed. Here's what I have currently installed in SDK Manager:
As the other SO threads suggested, I tried uninstalling the newest Android SDK Build-tools (25.0.2) and installed version 23.0.3 (all my projects target Android 6.0), but it also doesn't help, I still have the same error.
Maybe it's worth adding that this issue may have started to happen when I tried to implement RecyclerView in my app reading this tutorial, where they suggested to install Android 7.1.1 (API 25) in SDK Manager. However I undoed my all changes after that and even reintalled VS2017 + Xamarin.
Do you have any other idea why this can be ? I'd really appreciate any help. Thanks!
EDIT 2017-04-09:
Egh, I removed VS2017, installed VS2015 with brand new Android SDK and still the same issue :(
I've finally found what was the issue. It wasn't related to any component from SDK Manager or VS version.
Following localization tutorial from developer.xamarin.com, I played a bit with Strings.xml in my Android project. I wanted to have my Activities Label taken from resources as well, so in the ActivityAttribute I defined:
[Activity(Label = "#string/peopleListTitle")]
and added this value in Strings.xml file:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-------Other resources values ----->
<string name="peopleListTitle">People List</string>
</resources>
In that case my build is failing with above-mentioned error:
The file "obj\Debug\android\bin\packaged_resources" does not exist
When I change ActivityAttribute to use a string directly:
[Activity(Label = "People List")]
the build is passing without any issues.
I managed to find a solution, but actually I don't know why it's not building when I try to use Label text defined in Strings.xml.
BTW, I managed to find what's the problem by setting build output verbosity to Diagnostic in Tools -> Options -> Projects and Solutions -> Build and Run which gives a detailed info why the build failed in the Output window.
I had the same problem. After removing the dash "-" sign from the image file name, the problem is solved. Bad error message! It should not be:
The file "obj\Debug\android\bin\packaged_resources" does not exist.
Writing an error message like this causing the Developer to think about something else while the problem is the illegal file name.
I had the same issue when I added a new image as a resource.
There was a '-' in the file name (Invalid resource name character). I renamed & removed that character and all good.
Resource name can only consist of 0-9,a-z or A-Z or combination of any.
I had the same problem, and i removed all image file name have "-" character. My problem solved
Another reason for this error is that you may have a float number as your version number. In my case I changed it to a integer and everything worked fine. (I found the error by switching the build output to Detailed)
Simply it worked.
In one case I copied and pasted previous working "packaged_resources"
in the bin folder.[the problem was it did not reflect the UI changes]
Other I opened the visual studio as
administrator.
Next changed the "Minimum target to Android" to lower
apis in the project properties windows.
I suggest not touching the code behind of the design. If you get this error simply pull some button from the tool bar into the design and visual studio will come to its consciousness that there is change in UI. Next click on save all so that it make necessary change in the designer file.
Mine was a different solution (and only half a day lost): I was having trouble getting Hockey app to match crashes against the correct version of the app and realised it uses VersionCode not VersionName so I change my code to "0.0.34" the same as the name. For some still unknown reason the app built and deployed to devices for about 3 days before I started getting this error The file "obj\Debug\android\bin\packaged_resources" does not exist. Setting it back to a numeric value fixed the problem.
I found the problem by looking back through my GIT logs and rebuild each push until I found the one that caused the problem.
It just because the Version Code,I set Code by '1.0',The file "obj\Debug\android\bin\packaged_resources" does not exist.;And I set it by '1',everything is ok.
Had the same error, the way I got over it was crank up the Android SDK manager and install all updates and remove any obsolete packages. This happened to me because I was targeting something newer which was not installed.
Check to see if there are any unused entries in resources.designer.cs if there are any manually remove those entries.
This will fix the issue.
After following several online suggestions - updating SDK, updating Xamarin etc - none of which worked for me.
Finally found that I had an activity for a Android provider to Alarm clock in my AndroidManifest file as below
<activity
android:name="com.njcommuter.droid/android.provider.AlarmClock"
android:label="AlarmClock"
.....
/>
Removing this line - and rebuilding worked fine without any errors and was able to deploy solution successfully.
Note : testing this by putting the line back, and I get same error again on rebuilding.
It can be linked to using any android provider which creates the package for it, not necessarily AlarmClock only.
This error is, somewhat of, a wrapper for what can be multiple reasons that that the file was not created. The key is to look in the detailed output and look for the underlying error causing the file creation failure.
In my case, I had corrupted icon.png files (generated right from from the VS xamarin nunit template, no less!). Once I put in valid png files, everything was built fine.
Another reason for this error, if that the android NDK (not android SDK) isn't right, change de version can resolve the problem: go to Tools/Options/Xamarin/android Configurator and change de folder, in my case I've three, the last one can't compile, but the second folder with version xx.r11c do it.
For me it was Target Android Version.I had it set to
but changing it to Compiling version(for me it was the latest platform) resolved the issue.

titanium sdk "ERROR: Asset package include '/root/.titanium/mobilesdk/linux/3.3.0.GA/android/titanium.jar' not found"

so I started Titanium after a month or so to test a project code. When I am running the code, I am getting
ERROR: Asset package include '/root/.titanium/mobilesdk/linux/3.3.0.GA/android/titanium.jar' not found
I am not sure what is the issue?
Couldn't find anything related to this on Google.
Anyone else faced this? Your help will be appreciated.
So this answer fixed it for me. Do not forget to remove the directories under build tools which are above API 20.
It will work.

Microsoft JScript runtime error: path not found

I am trying to create a phonegap project.
While creating the project, I get an error that says:
"create.js(31, 5) Microsoft JScript runtime error: Path not found"
Could someone help me correcting this error??
Thanks in advance.
What version of PhoneGap? I think there was a bug that was fixed in versions 2.2 or around there. If you download 2.8 or 3.0 that issue should be fixed.
To go further, check that the folders you are trying to create are set up correct. The documentation around this is pretty weak and the CLI tools are very unforgiving, but I find that certain folders must be there and certain folders must not be there. For me, I hit just about every issue. The project name is used as a class name and a folder name so make sure you choose something that will be a valid class name. The last path of the project path must not exist, but any intermediate paths must exist. In this cmd, everything up to TestProj must exist but trunk must not exist.
bin> create C:\Projects\Cordova\TestProj\trunk com.company.testproj TestProj
If you encounter any of these it won't tell you, it just fails. Hope this helps.

Categories

Resources