Class referenced in the manifest, se.linerotech.myapplication.RepositoryActivity, was not found in the project or the libraries
this is my first app ever (github browser),am copying the steps from a video and when i tried to debugg my app to see if i was getting the data for user it crashed
i tried to redo the steps and go over everything i did but it didnt work
Just to be clear, you have two different errors in those screenshots.
The one in the manifest is saying it can't find the Activity class with that name, for the reason outlined in CommonsWare's answer - it's looking for se.linerotech.myapplication.RepositoryActivity, and that's not where your class is. It's in red because it's an unrecognised name/not found.
The other error is in the output window - it's saying you have an Activity class at se.linerotech.myapplication.acitvity.RepositoryActivity which hasn't been added to the manifest. This is true (you tried adding it, but didn't do it right) and every Activity needs to be included in the manifest, which is why it's complaining.
The two errors stem from the same issue, I just wanted to make it clear what each one means, since if you just looked at the error log you might think you've used the correct fully-qualified name for the class (it's right there in the output!). But it's two different sides complaining about the same thing for different reasons.
Class referenced in the manifest, se.linerotech.myapplication.RepositoryActivity, was not found in the project or the libraries
That is because you do not have a class with that fully-qualified class name.
Your class is se.linerotech.myapplication.activity.RepositoryActivity, because it resides in the se.linerotech.myapplication.activity package. Use se.linerotech.myapplication.activity.RepositoryActivity instead of .RepositoryActivity in your manifest.
Related
enter image description hereI renamed my android package from com.example.remote to com.mqtttools.com and my app did not work after that so I tried changing it back but is still does not work. I was following a stackowerflow answer that worked for many people.
I'm getting this "Unable to instantiate fragment mqtttools.remote.FirstFragment: make sure class name exists" error but the thing is that my package name is com.example.com and not mqtttools.remote.
Have you defined the fragment in XML?
If yes then please check the Fully classified class name in XML.
You need to update the package in the XML to resolve this error.
I was able to figure out the cause of the problem but not the solution. Something bad happened while renaming the package name across the myriad of files and it became corrupted. The only way that I was able to fix it is by creating a whole new project and copy/pasting all of the code.
Hope it saves the time for some of you who encounter the same problem.
I have Unable to create application im.app.android.core.AppDemoApplication: e3.b: com.pushserver.android.huaweiPushClient cant cast com.myApp.android.push_lib.huawei.HcmPushClient to PushClient error
What proguard rule should I add? I have tried -keep class com.myApp.android.push_lib.** { *; } but after that I just see the blank screen - no crash, just stuck when trying to start.
Not really an answer, but too long for a comment. I'll update this answer in case we make progress.
1. What is the "normal bug"?
can't cast com.myApp.android.push_lib.huawei.HcmPushClient to PushClient
This means that somewhere in your code you are assigning/passing an instance of HcmPushClient to something that is expecting it to be a PushClient. I would assume that PushClient is some class that you defined in your project, but is does not extend from HcmPushClient. Try to find this piece of code and fix it or add it here to your question.
2. What does ProGuard have to do with this?
Actually, I think not much. If ProGuard would create this error, the message would look more like
can't cast com.myApp.android.push_lib.a.b to c
But since all class names in the error message are the original ones, it does not seem like ProGuard is making issues here. BUT: You can still decypher the message a little bit, because this part is obfuscated:
Unable to create application im.app.android.core.AppDemoApplication: e3.b:
e3.b refers to a class that was obfuscated by ProGuard. To find out what class it is, you can check the file /build/outputs/mapping/release/mapping.txt in your project folder. This is a simple text file that stores the information what class name was renamed to what obfuscated name. In this file search for -> e3 to find the class that was renamed to e3. Somewhere close to this line, you should also be able to find out what exactly e3.b is. Could be a method, could also be a member variable or an inner class.
I hope these two points will bring you closer to make the app run.
Trying to implement the chat from this example but I keep getting
java.lang.IllegalArgumentException: couldn't make a guess for PACKAGE.databinding.ActivityChatBindingImpl
(not mentioning the package name, not necessary I believe)
Activity is called ChatActivity and XML (layout) file is "activity_chat.xml", exactly the same as from example so I don't need to post code here. I enabled databinding inside gradle file and tried putting the
android.databinding.enableV2=false
but this doesn't resolve the issue. What can be the issue here?
Also, looking at the DataBindingUtil.java class, I see that "DataBinderMapperImpl" is not generated for some reason.
For anyone out there having this issue, the only thing that helped is I had to change the package name, since mine was for example: "com.example.Example" and I changed it to all lowercase and that fixed the issue. However I did not change the "applicationId" (only folder names) therefore app does not need to be uploaded under the different package name again.
I have a MonoBehaviour class that has a property referencing another class which is ScriptableObject.
I've created several prefabs of my first class and created several ScriptableObjects of my second class, I've referenced them in the first class respectively.
In the editor everything works fine, except sometimes my so are shown in the Inspector as Missing Script and in property reference as NameOfSO (), don't know what causing this, but again, Play in the Editor is working just fine.
If build my game for Android and connect to the Debug, to see what's going on, I can clearly see, that's ScriptableObject reference is null. Why? Don't know, came here to ask a question.
Thanks!
I figured it out, turns out this was happening because of the weird thing with namings.
Allow me to explain, when I first created a class from ScriptableObject I used, lets say, MyClas name, I've created several instances of that class, but then I saw the error in the name of the class, I've changed it to the MyClass but only in the file itself, not the actual .cs file, so, this was happening. All I had to do is to ensure that my class and my file names are the same, delete old instances of ScriptableObject and create new ones from scratch and... Voila!
Sorry.
So I have just started running through the tutorial located here
Even though it starts off easily enough, with everything being described, the second chapter rushes you through action bars.
I have managed to import appCompat; which was located at C:\Users\New\Desktop\Programmin' languages\Android dev\adt-bundle-windows-x86_64-20130522\eclipse\sdk\extras\android\support\v7\appcompat - for me.
After importing appCompat I referenced it by going to properties>android and then the adding it to libraries.
What is confusing me is that the compiler allows me to write
public class DisplayMessageActivity extends ActionBarActivity {
without any errors; though I have referenced
android:support:v7:app:ActionBarActivity
so I didn't think that would give me an error.
Errors are coming from things like action_search (which I'll assume is a referenced xml) and openSearch() (a referenced class) - in my java activities
and #drawable/tab_unselected - which is located in my drawable-hdpi (under res).
I'm assuming that the person who wrote the tutorial presumed that my project would get these resources from the appCompat directory, but for some reason it isn't.
Please help, because the next chapter just goes on to describe how to develop new things - without addressing issues that could arise first.
Please see here on how to properly include the appcompat libraries in your Android project.