Error: Failed to resolve: com.badlogicgames.gdx:gdx-backend-lwjgl:1.6.5 - android-studio

I used gdx-setup.jar to generate a gradle project and then imported it inside Android Studio. But when I try to compile it, I get this error.
I checked the "desktop" + "Android" option while generating and use Android API 20. When I navigated inside the project, I found that in the DesktopLauncher.java class LwjglApplicationConfiguration appears red. The import statements
import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;
are both marked with errors. "lwjgl" is red and upon hovering over shows "Couldn't resolve symbol 'lwjgl' in blah blah"
Whats wrong?

This happened to me after updating. However, all I did was click build, then rebuild project, wait for it to rebuild and then for gradle to sync. After that everything should be fine.

Its fixed.
For some strange reason, the gdx-setup.jar file was not downloading lwjgl jar files into the .gradle folder in C:\Users\. Not sure why this was happening, maybe a bug. I went to Advanced settings and checked "IDEA" and then clicked generate. This time it downloaded a whole load of jar files. After it finished, I regenerated again by unchecking "IDEA" so that I would get a Gradle based build.
Finally it works. Maybe there's a bug in gdx-setup.jar

Related

unable to find main.dart and lib folder from imported flutter project

hi there!
i backed up my flutter project folder due to some issues with my drive,
i fixed the issues
only for me to try importing the project and continuing my work
and it turns out i can't find my main.dart file along with my entire lib folder
the only recognizable thing left in the project seems to be the assets folder
help me, please
this has really pushed me way behind schedule
also I would be much grateful if i could get an app that decompiles flutter apks
as my code is still in debug mode and i have the apk file.
thanks
enter image description here
To get source code of your apk file(debug) :-
Step 1- download strings for Windows (in your case)
https://learn.microsoft.com/en-us/sysinternals/downloads/strings
Step 2-
Since kernel_blob.bin has all your app's source code,
Run this command,
strings /path/to/extracted/apk/assets/flutter_assets/kernel_blob.bin > extracted_code.dart
Here, replace, "path to extracted" to your own path.
Step 3
You’ll need to clean the extract_code file, and strings like “dart”, “import”, “void” and other keywords in ‘extracted_code.dart’, will help you find the code itself.(search for them to get your code)

Gradle build failed with new import rules

I met an error after I updated android studio to version 3.6. When I tried to import Scenceform asset, it shows a warning in the picture below, whatever I click, it will return
java.lang.RuntimeException: java.lang.NoSuchMethodError: com.android.tools.idea.templates.recipe.RecipeExecutor.append(Ljava/io/File;Ljava/io/File;)
How can I fix this?
-- Update June 2020 --
Sceneform 1.15 has been replaced by the open source Sceneform 1.16. This appears to have also changed the model build approach, no longer using the SceneForm plugin and .sfa/.sfb workflow and instead including direct support for .gltf format model.
More information is available on the GitHub page, although the respoitory has now been archived which makes it hard to understand the future direction for Sceneform at this time (June 2020):
(https://github.com/google-ar/sceneform-android-sdk)
-- Workaround to the original problem if you are using Sceneform 1.15 --
To workaround the issue is you are using the Sceneform Plugin - see below:
This appears to be an issue with Android Studio 3.6 at the time of writing - see the issue here:
https://github.com/google-ar/sceneform-android-sdk/issues/912
One workaround appears to be to revert to Android Studio 3.5.
Alternatively adding the asset manually appears to work - taking the example in the online documentation for ARCore (https://developers.google.com/ar/develop/java/sceneform):
Follow these steps to import a new 3D asset:
Verify that your project's app folder contains a sampledata folder.
To create the folder, right-click on the app folder in the Project window, then select New > Sample Data Directory.
The sampledata folder is part of your Android Studio project, but its contents will not be included in your APK.
Copy your 3D model source asset file (*.obj, *.fbx, or .gltf), and all of its dependencies (.mtl, *.bin, *.png, *.jpg, etc.) into the sampledata folder.
Do not copy these source files into your project's assets or res folder, as this will cause them to be included in your APK unnecessarily.
Now instead of right clicking and using import, as the instructions at the link above go on to say, add the following lines to the bottom of your build.gradle(app) file manually:
apply plugin: 'com.google.ar.sceneform.plugin'
sceneform.asset('sampledata/andy.obj', // 'Source Asset Path' specified during import.
'default', // 'Material Path' specified during import.
'sampledata/andy.sfa', // '.sfa Output Path' specified during import.
'src/main/res/raw/andy') // '.sfb Output Path' specified during import.
Rebuild your project and the renderable should be imported correctly - check that andy.sfb has appeared in the 'res/raw' folder to be sure.
#harsha make sure the .obj file is referring to the right material.
mtllib chroma_key_video.mtl
g default
v -0.000000 2.244259 0.431967
v ...

How Do We Wire Up Converted Unit Tests in Doppl?

I am attempting to replicate what I see in PartyClickerSample in a fresh project, and am having difficulty with the pod and using it from Swift to set up the unit tests.
Based on PartyClickerSample, AFAICT, what I am supposed to do is put a Podfile like this in the iosTest/ directory (that contains a newly-created Xcode project):
platform :ios, '9.0'
target 'iosTest' do
use_frameworks!
pod 'testdoppllib', :path => '../app/build'
end
Then:
In AppDelegate.swift, import testdoppllib and call DopplRuntime.start() from the application() func
In ViewController.swift, import testdoppllib and call runResource() on... something that I can't quite figure out what it maps to
However, I can't even get to the latter bullet, as things start going sideways from the outset.
pod install seems to work as expected:
Analyzing dependencies
Fetching podspec for `testdoppllib` from `../app/build`
Downloading dependencies
Installing testdoppllib (0.1.0)
Generating Pods project
Integrating client project
[!] Please close any current Xcode sessions and use `iosTest.xcworkspace` for this project from now on.
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.
However, when I re-open the workspace:
In the Xcode tree thingy, Pods/Products/ shows testdoppillib.framework in red (which doesn't look good) and also shows Pods_iosTest.framework in black
If I try import testdoppillib, I get a message saying that Xcode does not recognize that name
If I try import Pods_iosTest, Xcode seems to find it, but then it does not recognize DopplRuntime.start()
So, what are the steps, in a Cocoapods-based Doppl setup, for starting the Doppl-created unit tests in Xcode?
Running pod install with set up the testdoppllib framework, but doesn't actually build it. One of the frustrating parts of the cocoapods process is you'll need to run build in Xcode, which should first build testdoppllib, then your Swift code.
To summarize, testdoppllib shows up as red, but it's most likely OK and just needs to be built. Once it's build, your Swift code should see "import testdoppllib"
For runResource, that's a little more complicated.
The Doppl gradle plugin writes a file called dopplTests.txt to the build/j2objcSrcGenTest directory. That's a listing of all the test classes. You need to add that file to Xcode, then pass in that name to DopplJunitTestHelper.runResource.
There's probably a way to set that up with cocoapods, but we haven't done that yet.

Android Studio 2.3.2 Gradle Error

I am new to Android Studio, and everything was going fine until I received a nonsense error:
"Error:Execution failed for task ':app:processDebugResources'. > Duplicate symbol in table with resource type 'id' and symbol name 'title_conctact'"
I have no idea what it means and I have tried to fix it for two days. I tried uninstalling Android Studio which deleted all my progress, but still, the error remained. Please help, this is annoying. By the way, I am using the latest version 2.3.2.
hi after finding so much on web i don't get any solution so i tried myself to debug it and i got success to fix this issue you need to find the name in files in your case the name is title_conctact so you will get duplicate id's, now you need to rename and make them unique
that's it your problem will be fixed
I had the same issue. The issue I had was due to the keys declared differently in one of my module's resource file and my app's resource file.
In the module's strings.xml file, if you declare the key as 'title.conctact' and in the app's strings.xml file if you declare it as 'title_conctact', then you will face this error.
Changing it to a single format resolved my issue.
Double-clicking SHIFT will open a window. Put the title_conctact inside the search and you will find the .xml file that contains the duplicate id

Build is producing a .momd in the bundle that is missing the .mom file

I have an app that has been running fine on the iPhone simulator for some time. Recently, I decided I wanted to re-use the data model and related classes in another project - so I dragged them from this project window to the other then told Xcode not to copy, just to make references. At first this didn't work so I jumped through a number of hoops to try to fix it (I may be asking more about that in another post). After all this, I re-compiled and tried to run the original app -- and it's not working any more. On further investigation, I discovered that when I re-compile the original app, I end up with a bundle that contains a .momd package but it contains only a Versioninfo.plist file - no .mom file, no .omo file like I'm expecting to see. I don't recall making any changes to the original app. I don't get any warnings. I just get an incomplete .momd package (and, not surprisingly, my app now crashes).
What's going on here?
BTW, the app now crashes with this message:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[__NSArrayM insertObject:atIndex:]: object cannot be nil'
Which I get when executing this line of code:
self.productRegistry = [[UIManagedDocument alloc] initWithFileURL:self.productRegistryURL];
I figured this out by looking more closely at the file locations in the project directory using Finder. In the Xcode window, everything looks normal but in the actual project directory I found that the .datamodeld package had ended up at the top level of the project directory -- at the same level as the project package itself. Xcode apparently did not like this but unfortunately it did not complain -- it just created a partial build output. Once I moved the .datamodeld package into the same folder as the rest of the project's code, everything worked just fine.
This would appear to be just a quirk. I would expect that Xcode would either see that all is well and build correctly OR it would see that things weren't quite as they should be and fail. In this case, it did not build correctly but was silent about it.
Hope this answer helps someone else someday.

Resources