How to add android resource folder in flutter project? - dart

When I create XML resource directory then display the error 'Cannot find resource directory for module Module' how to resolve this error in flutter project??

I face this problem too and the only work around that i found was open the project as a native project in other android studio instance and then create the resource directories. You can do this selecting 'app' module on android studio open project dialog.

Related

Exposing flutter module as IOS framework results in "Failed to find assets path for "Frameworks/App.framework/flutter_assets"

I am receiving Failed to find assets path for "Frameworks/App.framework/flutter_assets when trying to expose a Flutter project via a framework to another IOS project (Add to App via a Framework).
I created a Flutter project that i now want to expose as a native Framework for IOS. We want to share our project with other companies so that they can integrate it in their IOS application.
I followed the documentation described on https://flutter.dev/docs/development/add-to-app/ios/project-setup and i used option C. This will create an XCFramework of our Flutter module and integrate it in our native IOS Framework which will have an API to work with the flutter project. In that way our IOS Framework can be seen as an Umbrella kind of Framework but also with an exposed API.
So what i created is:
A Flutter module
An IOS Framework
An IOS Project
I build the flutter module using ./flutterw build ios-framework --cocoapods --xcframework --no-universal --output=../WhiteLabelIOSFrameWork/Flutter --verbose into the IOS Framework. I added the libraries to the Framework and i created a codespec file for the Framework with only Flutter as a dependency. Afterwards i added a Podfile to the project and added the Framework as a dependency.
All of this is working (i only needed to upgrade to Flutter 1.24.X to have this fix available https://github.com/flutter/flutter/pull/69736). But when i start my Flutter engine it's unable to find the flutter_assets (Failed to find assets path for "Frameworks/App.framework/flutter_assets).
I tried building the ios-framework directly into our IOS project and skip the in between Framework and then it seems to work. So i think it cannot find the flutter_assets since the App.framework is not in the IOS project itself, but in a Framework in between.
Is there a way to move the flutter_assets path or so? Or any other idea on how to solve this?
Kind regards,
Daan
This issue cause when you create Flutter Engine without FlutterDartProject.
Just add FlutterEngine(name: "your name", project: FlutterDartProject(precompiledDartBundle: Bundle.init(for: Self.self)))

How to fix the "SDK directory does not exist"?

So I'm trying to get my react native software to run and it's popping up with an error saying The SDK directory 'C:\Program Files\Android\Android studio; ' does not exist. How can I fix this?
Lookup 2 places:
Possible duplicate of your question
React Native start Guide
If you installed all necessary things listed in guide just do:
react-native init YOURPROJECTNAME
and after build add local.properties file in android folder of your app.
It should contain line: sdk.dir = C:\\Users\\USERNAME\\AppData\\Local\\Android\\sdk

Xamarin forms Maps

im working on xamarin forms at the moment every time when i start a new xamarin form project i update the xamarin forms from the nuget package every things work fine until i started to work with maps and every time i install the xmarin.forms.maps after the install is finished i try to build my solution keeps throw 8 errors.droid
the problem is in the android platform only
Severity Code Description Project File Line Suppression State
Error Please install package: 'GPS Base' available in SDK installer. Android resource directory C:\Users\IBRAHIM\AppData\Local\Xamarin\Xamarin.GooglePlayServices.Base\8.4.0\content./ doesn't exist. WorkingWithMaps.Android
Error Please install package: 'GPS Maps' available in SDK installer. Java library file C:\Users\IBRAHIM\AppData\Local\Xamarin\Xamarin.GooglePlayServices.Maps\8.4.0\content\classes.jar doesn't exist. WorkingWithMaps.Android
Error Please install package: 'GPS Base' available in SDK installer. Java library file C:\Users\IBRAHIM\AppData\Local\Xamarin\Xamarin.GooglePlayServices.Base\8.4.0\content\classes.jar doesn't exist. WorkingWithMaps.Android
Error Please install package: 'GPS Basement' available in SDK installer. Android resource directory C:\Users\IBRAHIM\AppData\Local\Xamarin\Xamarin.GooglePlayServices.Basement\8.4.0\content./ doesn't exist. WorkingWithMaps.Android
Error Reason: File C:\Users\IBRAHIM\AppData\Local\Xamarin\zips\CAA441D76F04E0D57C4110F8A00CDA7A.zip is not a ZIP archive WorkingWithMaps.Android
Error Please install package: 'GPS Maps' available in SDK installer. Android resource directory C:\Users\IBRAHIM\AppData\Local\Xamarin\Xamarin.GooglePlayServices.Maps\8.4.0\content./ doesn't exist. WorkingWithMaps.Android
Error Please install package: 'GPS Basement' available in SDK installer. Java library file C:\Users\IBRAHIM\AppData\Local\Xamarin\Xamarin.GooglePlayServices.Basement\8.4.0\content\classes.jar doesn't exist. WorkingWithMaps.Android
Error Unzipping failed. Please download https://dl-ssl.google.com/android/repository/google_m2repository_r24.zip and extract it to the C:\Users\IBRAHIM\AppData\Local\Xamarin\Xamarin.GooglePlayServices.Base\8.4.0\content directory. WorkingWithMaps.Android
ive been stuck for 3 days now pleasee HELLPPPP MEEE OUT !!!
google play services base and basement folders are empty what should id
I ended up having to do it by hand... Here are the steps though
Download zip file (https://dl-ssl.google.com/android/repository/google_m2repository_r22.zip)
Extra zip file
Go to folder you need the library for (let's say play-services-base)
Go to version (example: 8.1.0)
Rename file ending in .aar to .jar
Extract .jar file to a folder (I used 7Zip)
Copy all the contents of the folder
Go to "C:\Users{USER}\AppData\Local\Xamarin"
If doesn't exist, create needed folder (for "play-services-base" I created "Xamarin.GooglePlayServices.Base")
Created folder for version (Example: 8.1.0) and then a folder in that called "embedded"
Paste files from before into this folder
Go back to step 3 and keep repeating till all libraries are added
Ya it's a pain.... But it works
This is obviously not related to any SDK.The log clearly states the issue.
Your nuget packages are corrupted , this has happens when you try updating your xamarin forms to the latest version, along with other packages.
First
I would recommend starting a fresh project.
When installing Xamarin forms maps, ensure that all the version of the nuget package match, ensure there is no version mismatch. Do not update to the latest version. Find a mid-level stable version of the package needed and update to this. Now go to each Device specific component and check the references ensure there is no (!) under the referenced package.
Second
Navigate to your appdata directory
close visual studio.
C:\Users\john.doe\AppData\Local\ in this directory find the Xamarin folder.
Delete the "Xamarin" folder.
Open VS ===> Clean solution, and Rebuild the entire solution.
This will take a while, because you will re-download all the packages.
Viola!! Happy coding.
Thank you
i think you must have to update your SDK. then give proper permission for the map related implementation i hope that it will work fine in my case it is working good.

XCode clang error no such file or directory with Push Plugin (Cordova project)

I am developing a cordova project. A project which is intended to run cross platform: Android, Windows phone, iOS.
I using this pushplugin to implement push notifications: the push plugin is intended to communicate between the device and the relevant push notification system (Android: GCM, Windows: WNS, Apple: APNS): https://github.com/phonegap/phonegap-plugin-push
On a windows pc, in the visual studio, I have managed to implement push notifications in a todo app. The app runs well in the cross platform solution which runs on visual studio.
Now as you may know, in a Cordova app, when building for a specific platform, folders for each platform are created as sub folders to a folder called platforms found in the project directory.
When I tried building for ios and put the project folder on a ios computer, I am opening the project in Xcode and trying to run it, but I am getting these kind of errors referring to the same push plugin:
clang: error: no such file or directory: '/Users/Jurgen/Documents/Xcode/backbonetodo/BackboneToDo/platforms/ios/BackboneToDoPluginsphonegap-plugin-pushGCMLibrarieslibGGLCloudMessaging.a'
clang: error: no such file or directory: '/Users/Jurgen/Documents/Xcode/backbonetodo/BackboneToDo/platforms/ios/BackboneToDoPluginsphonegap-plugin-pushGCMLibrarieslibGGLCore.a'
clang: error: no such file or directory: '/Users/Jurgen/Documents/Xcode/backbonetodo/BackboneToDo/platforms/ios/BackboneToDoPluginsphonegap-plugin-pushGCMLibrarieslibGGLInstanceIDLib.a'
I just copied the first 3 errors (but there are over 20).
The push plugin works fine on visual studio and normally by copying the project folder on a mac computer and running the .xcodeproject file from inside the iOS platform folder, I manage to run with no problems.
Any idea, what could be wrong? I am also notificing that after BackboneToDo there is no / and also after Plugins. It seems like the way it is creating the directory is not right. I also tried to change the location to absolute but this didnt solve the problem.
Any help?
Thanks in advance
While coping the files of deferent platforms make sure you don't copy the following files / folders.
cordova_plugins.js, cordova-js-src, cordova.js, plugins.
It seems like you have copied the push plugin for android in iOS project.

Missing phonegap-1.3.0.js for iOS

Where can I find phonegap-1.3.0.js file iOS. In package it is there for Android.
Presently I'm using phonegap-1.2.0.js, which I found somewhere. Now I need 1.3.0.
I just found the solution.
just create a new phonegap project in xCode and don't include the "www" folder.
Just run the project. Now goto the foledr in which project is located.
You can find the folder "www" in which the phonegap.js is located

Resources