android imports cant be resolved in a test project - android-testing

Hi Im trying to import the demo test project from google at http://developer.android.com/training/activity-testing/activity-functional-testing.html, But the following imports can't be resolver
import com.example.android.testingfun.R;
//this are the classes that need to be tested
import com.example.android.testingfun.lesson2.MyFirstTestActivity;
import com.example.android.testingfun.lesson3.ClickFunActivity;
import com.example.android.testingfun.lesson4.LaunchActivity;
import com.example.android.testingfun.lesson4.NextActivity;
import com.example.android.testingfun.lesson5.ReceiverActivity;
import com.example.android.testingfun.lesson5.SenderActivity;
Im importing the project in eclipse. Thanks

ctrl+1 fix fix project, add to build bath

Related

How do I import my project into a Playground in Xcode 10?

Luckily in Xcode 10 you can once again create a Playground inside of an Xcode project. I'm able to import my pods but I'd like to import my classes for quick Playground-driven development. My project is called foo but I'm not able to do import foo in the Playground. The playground is located in Foo/foo in the directory structure.

In oc project to import swift file by cocoapods , *-Swift.h not found

I met a question, my project was created by oc , then I import a swift file by cocoapods , and I set Defines Module . In normal , It will have a *-Swift.h by created by default, but when I import *-Swift.h to project, It will tell me file not found, but if I not use cocoapods import file , it will not have this question. who can tell me why ? thanks in advance.
Use a module import like:
#import Alamofire;

Xcode 7.3: import Module displayed with strikethrough

After upgrading Xcode to 7.3, I just found that some modules are stricken out while importing, like in this screenshot:
But after adding the module (so just pressing enter) everything is fine. What does that mean? The module here is written in Swift and works fine.
This is a bug. We have fixed it in 218010af, which should be included in the Swift 2.2.1 release and is included in the 2016-04-12-a developer snapshot.
The strikethrough occurs if you try to import a module that has already been imported by your file or module:
In this case, I have already imported Foundation (which implicitly imports CoreFoundation), so Xcode is telling you that there is no need to import either module again.
It usually happens when a framework is already imported by any other framework you have already been imported.
For example, UIKit is already imported with Foundation so you don't need to import it manually.
I changed the order of the imports
import Foundation
import UIKit
import LayerKit
import Atlas < red line
import Foundation
import UIKit
import Atlas
import LayerKit
Some notes that may be causing it:
LayerKit importing Atlas even though LayerKit is the lower level API
Atlas is the UI layer
Both were Cocoapod imports
Error appeared when I created an 2nd Schema for App Store/Enteprise
releases and cleaned one and switch to the other.
Deleting Derived
Data didnt clear it.
So tried rearranging them and red line disappeared

Import statement for Venmo iOS SDK in swift for embedded framework

I am trying to implement the Venmo-iOS-SDK into my app using CocoaPods. Inside my Podfile, I have the use_frameworks! statement to make all dependencies into embedded frameworks. After running pod install, the Venmo-iOS-SDK appears to correctly be installed in CocoaPods, but I cannot figure out what to put at the top of my files as an import statement.
The other pods that I have worked with do not have dashes in their name, so I am just able to put import PodName. However, import Venmo-iOS-SDK triggers a compile time error stating "consecutive statements on a line must be separated by a ;".
I have tried all the following statements and none work:
import Venmo-iOS-SDK
import Venmo
import VenmoiOSSDK
import VenmoSDK
Does anyone know what to import for this framework in swift, or what the import statement looks like for other pods with a - in their name?
I'd try the below option
import Venmo_iOS_SDK

Xcode 6 Playground using Parse framework?

I would like to use Parse SDK/Framework my playground file but I get an error if I import it. I can import the iOS frameworks like UIKit
I know there are similar posts to this (How to I import 3rd party frameworks into Xcode Playground?)
but i could not make it work for my project.
Any help here is very very much appreciated... I am not a complete newbie but am not an expert So as many details (almost for dummies ;-)) as you can please...Many thanks.
To get Parse working in playground you will need to create an Xcode project and include the Parse framework. Then within that project you can add a playground and import frameworks and code written in that project. Hope this helps.
If you are curious I did it for a framework I created and created a Playground inside the projects workspace. In that I import Dollar which is a custom framework but I guess you could import Parse and it should work https://github.com/ankurp/Dollar.swift

Resources